Jet  v1.3.3
nearest_neighbor_query_engine2.h
Go to the documentation of this file.
1 // Copyright (c) 2018 Doyub Kim
2 //
3 // I am making my contributions/submissions to this project solely in my
4 // personal capacity and am not conveying any rights to any intellectual
5 // property of any third parties.
6 
7 #ifndef INCLUDE_JET_NEAREST_NEIGHBOR_QUERY_ENGINE2_H_
8 #define INCLUDE_JET_NEAREST_NEIGHBOR_QUERY_ENGINE2_H_
9 
10 #include <jet/constants.h>
11 #include <jet/vector2.h>
12 
13 #include <functional>
14 
15 namespace jet {
16 
18 template <typename T>
20  const T* item = nullptr;
21  double distance = kMaxD;
22 };
23 
25 template <typename T>
27  std::function<double(const T&, const Vector2D&)>;
28 
30 template <typename T>
32  public:
36  const Vector2D& pt,
37  const NearestNeighborDistanceFunc2<T>& distanceFunc) const = 0;
38 };
39 
40 } // namespace jet
41 
42 #endif // INCLUDE_JET_NEAREST_NEIGHBOR_QUERY_ENGINE2_H_
jet::NearestNeighborQueryResult2
Nearest neighbor query result.
Definition: nearest_neighbor_query_engine2.h:19
jet
Definition: advection_solver2.h:18
vector2.h
jet::NearestNeighborQueryResult2::item
const T * item
Definition: nearest_neighbor_query_engine2.h:20
jet::Vector< T, 2 >
2-D vector class.
Definition: vector2.h:24
jet::NearestNeighborQueryEngine2
Abstract base class for 2-D nearest neigbor query engine.
Definition: nearest_neighbor_query_engine2.h:31
jet::NearestNeighborDistanceFunc2
std::function< double(const T &, const Vector2D &)> NearestNeighborDistanceFunc2
Nearest neighbor distance measure function.
Definition: nearest_neighbor_query_engine2.h:27
jet::NearestNeighborQueryResult2::distance
double distance
Definition: nearest_neighbor_query_engine2.h:21
jet::kMaxD
constexpr double kMaxD
Max double.
Definition: constants.h:88
jet::NearestNeighborQueryEngine2::nearest
virtual NearestNeighborQueryResult2< T > nearest(const Vector2D &pt, const NearestNeighborDistanceFunc2< T > &distanceFunc) const =0
constants.h