Map Matching
kdtree.h
Go to the documentation of this file.
1 #ifndef KDTREE_H
2 #define KDTREE_H
3 
4 #include <vector>
5 
6 #include "../point.h"
7 #include "boxnode.h"
8 
9 class KDTree {
10 public:
11  static const double BIG;
12  KDTree(std::vector<Point>& points);
13  ~KDTree();
14 
15  int partition(const int k, int* index, int n, double* arr);
16 
17  double distance(int idxOfPoint1, int idxOfPoint2);
18  int locate(const Point& p);
19 
20 protected:
22  std::vector<Point> m_vectorOfPoints;
27 };
28 
29 #endif // KDTREE_H
Definition: boxnode.h:6
static const double BIG
Definition: kdtree.h:11
std::vector< int > m_vectorOfPointIndexes
Definition: kdtree.h:25
int m_noOfPoints
Definition: kdtree.h:23
std::vector< Point > m_vectorOfPoints
Definition: kdtree.h:22
Definition: kdtree.h:9
int partition(const int k, int *index, int n, double *arr)
Definition: kdtree.cpp:90
int m_noOfBoxes
Definition: kdtree.h:21
int locate(const Point &p)
Definition: kdtree.cpp:145
BoxNode * m_arrayOfBoxes
Definition: kdtree.h:24
KDTree(std::vector< Point > &points)
Definition: kdtree.cpp:10
double * m_arrayOfCoordinates
Definition: kdtree.h:26
~KDTree()
Definition: kdtree.cpp:84
double distance(int idxOfPoint1, int idxOfPoint2)
Definition: kdtree.cpp:137
The Point class.
Definition: point.h:20
std::vector< int > m_vectorOfReversedPointIndexes
Definition: kdtree.h:25