NearestNeighborQueryEngine3.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: NearestNeighborQueryEngine3.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract base class for 3-D nearest neigbor query engine.
6 > Created Time: 2017/10/14
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_NEAREST_NEIGHBOR_QUERY_ENGINE3_H
10 #define CUBBYFLOW_NEAREST_NEIGHBOR_QUERY_ENGINE3_H
11 
12 #include <Core/Vector/Vector3.h>
13 
14 namespace CubbyFlow
15 {
17  template <typename T>
19  {
20  const T* item = nullptr;
21  double distance = std::numeric_limits<double>::max();
22  };
23 
25  template <typename T>
26  using NearestNeighborDistanceFunc3 = std::function<double(const T&, const Vector3D&)>;
27 
29  template <typename T>
31  {
32  public:
35  const Vector3D& pt,
36  const NearestNeighborDistanceFunc3<T>& distanceFunc) const = 0;
37  };
38 }
39 
40 #endif
3-D vector class.
Definition: Vector3.h:26
Abstract base class for 3-D nearest neighbor query engine.
Definition: NearestNeighborQueryEngine3.h:30
const T * item
Definition: NearestNeighborQueryEngine3.h:20
virtual NearestNeighborQueryResult3< T > GetNearestNeighbor(const Vector3D &pt, const NearestNeighborDistanceFunc3< T > &distanceFunc) const =0
Returns the nearest neighbor for given point and distance measure function.
Definition: pybind11Utils.h:24
double distance
Definition: NearestNeighborQueryEngine3.h:21
Nearest neighbor query result.
Definition: NearestNeighborQueryEngine3.h:18
std::function< double(const T &, const Vector3D &)> NearestNeighborDistanceFunc3
Nearest neighbor distance measure function.
Definition: NearestNeighborQueryEngine3.h:26