-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKDtree.h
More file actions
34 lines (33 loc) · 1.08 KB
/
Copy pathKDtree.h
File metadata and controls
34 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include"treeNode.h"
#include <vector>
#include <limits>
#include <list>
#include"hashTable.h"
#include "hashTablePlus.h"
using namespace std;
class KDtree
{
private:
treeNode* root;
vector<treeNode*> all_nodes;
public:
KDtree();
treeNode* getRoot();
void insert(string, string, coordinate, hashTable&, hashTablePlus&, int, bool);
void Delete(coordinate, hashTable&, list<pair<string, int>>&, hashTablePlus&, int, bool, bool);
void pizzeria_in_region();
double distance(coordinate, coordinate);
void nearest_pizzeria(coordinate&, bool);
treeNode* find_nearest(treeNode*, coordinate&, int);
coordinate find_nearest(coordinate&, int);
void nearest_branch(string, coordinate, hashTable&);
void pizzeria_in_circle(const coordinate&, float);
void pizzeria_traverse(coordinate, float, treeNode*, bool*);
void pizzeria_sort(int, int, int, vector<treeNode*>&);
void pizzeria_merge(int, int, int, int, vector<treeNode*>&);
treeNode* buildTreeRecursive(int, int, int, vector <treeNode*>&);
void buildTree(vector<treeNode*>&);
vector<treeNode*>& set_get_allNodes();
~KDtree();
};