LeafSizeNSWrapper wraps any NeighborSearch types that take a leaf size for tree construction. More...
Public Member Functions | |
LeafSizeNSWrapper (const NeighborSearchMode searchMode, const double epsilon) | |
Construct the LeafSizeNSWrapper by delegating to the NSWrapper constructor. More... | |
virtual | ~LeafSizeNSWrapper () |
Delete the LeafSizeNSWrapper. More... | |
virtual LeafSizeNSWrapper * | Clone () const |
Return a copy of the LeafSizeNSWrapper. More... | |
virtual void | Search (util::Timers &timers, arma::mat &&querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances, const size_t leafSize, const double) |
Perform bichromatic search (e.g. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the NeighborSearch model. More... | |
virtual void | Train (util::Timers &timers, arma::mat &&referenceSet, const size_t leafSize, const double, const double) |
Train a model with the given parameters. More... | |
Public Member Functions inherited from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType > | |
NSWrapper (const NeighborSearchMode searchMode, const double epsilon) | |
Construct the NSWrapper object, initializing the internally-held NeighborSearch object. More... | |
virtual | ~NSWrapper () |
Delete the NSWrapper object. More... | |
const arma::mat & | Dataset () const |
Get a reference to the reference set. More... | |
double | Epsilon () const |
Get epsilon, the approximation parameter. More... | |
double & | Epsilon () |
Modify epsilon, the approximation parameter. More... | |
virtual void | Search (util::Timers &timers, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances) |
Perform monochromatic neighbor search (i.e. More... | |
NeighborSearchMode | SearchMode () const |
Get the search mode. More... | |
NeighborSearchMode & | SearchMode () |
Modify the search mode. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the NeighborSearch model. More... | |
Public Member Functions inherited from NSWrapperBase | |
NSWrapperBase () | |
Create the NSWrapperBase object. More... | |
virtual | ~NSWrapperBase () |
Destruct the NSWrapperBase (nothing to do). More... | |
Additional Inherited Members | |
Protected Types inherited from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType > | |
typedef NeighborSearch< SortPolicy, metric::EuclideanDistance, arma::mat, TreeType, DualTreeTraversalType, SingleTreeTraversalType > | NSType |
Protected Attributes inherited from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType > | |
NSType | ns |
The instantiated NeighborSearch object that we are wrapping. More... | |
LeafSizeNSWrapper wraps any NeighborSearch types that take a leaf size for tree construction.
The implementations of Train() and Search() take the leaf size into account.
Definition at line 40 of file neighbor_search.hpp.
|
inline |
Construct the LeafSizeNSWrapper by delegating to the NSWrapper constructor.
Definition at line 205 of file ns_model.hpp.
|
inlinevirtual |
Delete the LeafSizeNSWrapper.
Definition at line 216 of file ns_model.hpp.
|
inlinevirtual |
Return a copy of the LeafSizeNSWrapper.
Reimplemented from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >.
Definition at line 219 of file ns_model.hpp.
References NSWrapperBase::Search(), and NSWrapperBase::Train().
|
virtual |
Perform bichromatic search (e.g.
search with a separate query set). This overload uses the leaf size, but ignores the other parameters.
Reimplemented from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >.
|
inline |
Serialize the NeighborSearch model.
Definition at line 244 of file ns_model.hpp.
|
virtual |
Train a model with the given parameters.
This overload uses leafSize but ignores the other parameters.
Reimplemented from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >.