Loading...
Searching...
No Matches
NearestNeighborQueryEngine.hpp
Go to the documentation of this file.
1// This code is based on Jet framework.
2// Copyright (c) 2018 Doyub Kim
3// CubbyFlow is voxel-based fluid simulation engine for computer games.
4// Copyright (c) 2020 CubbyFlow Team
5// Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6// AI Part: Dongheon Cho, Minseo Kim
7// We are making my contributions/submissions to this project solely in our
8// personal capacity and are not conveying any rights to any intellectual
9// property of any third parties.
10
11#ifndef CUBBYFLOW_NEAREST_NEIGHBOR_QUERY_ENGINE_HPP
12#define CUBBYFLOW_NEAREST_NEIGHBOR_QUERY_ENGINE_HPP
13
15
16#include <functional>
17#include <limits>
18
19namespace CubbyFlow
20{
22template <typename T, size_t N>
24{
25 const T* item = nullptr;
26 double distance = std::numeric_limits<double>::max();
27};
28
30template <typename T>
32
34template <typename T>
36
38template <typename T, size_t N>
40 std::function<double(const T&, const Vector<double, N>&)>;
41
43template <typename T>
45
47template <typename T>
49
51template <typename T, size_t N>
83
85template <typename T>
87
89template <typename T>
91} // namespace CubbyFlow
92
93#endif
Definition Matrix.hpp:30
Abstract base class for N-D nearest neighbor query engine.
Definition NearestNeighborQueryEngine.hpp:53
NearestNeighborQueryEngine & operator=(const NearestNeighborQueryEngine &other)=default
Default copy assignment operator.
NearestNeighborQueryEngine(NearestNeighborQueryEngine &&other) noexcept=default
Default move constructor.
virtual NearestNeighborQueryResult< T, N > Nearest(const Vector< double, N > &pt, const NearestNeighborDistanceFunc< T, N > &distanceFunc) const =0
NearestNeighborQueryEngine()=default
Default constructor.
NearestNeighborQueryEngine(const NearestNeighborQueryEngine &other)=default
Default copy constructor.
NearestNeighborQueryEngine & operator=(NearestNeighborQueryEngine &&other) noexcept=default
Default move assignment operator.
virtual ~NearestNeighborQueryEngine()=default
Default virtual destructor.
Definition pybind11Utils.hpp:21
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738
std::function< double(const T &, const Vector< double, N > &)> NearestNeighborDistanceFunc
N-D nearest neighbor distance measure function.
Definition NearestNeighborQueryEngine.hpp:40
N-D nearest neighbor query result.
Definition NearestNeighborQueryEngine.hpp:24
double distance
Definition NearestNeighborQueryEngine.hpp:26
const T * item
Definition NearestNeighborQueryEngine.hpp:25