mlpack
|
RSWrapper is a wrapper class for most RangeSearch types. More...
#include <rs_model.hpp>
Public Member Functions | |
RSWrapper (const bool singleMode, const bool naive) | |
Create the RSWrapper object. | |
virtual RSWrapper * | Clone () const |
Create a new RSWrapper that is the same as this one. More... | |
virtual | ~RSWrapper () |
Destruct the RSWrapper (nothing to do). | |
const arma::mat & | Dataset () const |
Get the dataset. | |
bool | SingleMode () const |
Get whether single-tree search is being used. | |
bool & | SingleMode () |
Modify whether single-tree search is being used. | |
bool | Naive () const |
Get whether naive search is being used. | |
bool & | Naive () |
Modify whether naive search is being used. | |
virtual void | Train (arma::mat &&referenceSet, const size_t) |
Train the model (build the reference tree if needed). More... | |
virtual void | Search (arma::mat &&querySet, const math::Range &range, std::vector< std::vector< size_t >> &neighbors, std::vector< std::vector< double >> &distances, const size_t) |
Perform bichromatic range search (i.e. More... | |
virtual void | Search (const math::Range &range, std::vector< std::vector< size_t >> &neighbors, std::vector< std::vector< double >> &distances) |
Perform monochromatic range search (i.e. More... | |
template<typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the RangeSearch model. | |
![]() | |
RSWrapperBase () | |
Create the RSWrapperBase object. More... | |
virtual | ~RSWrapperBase () |
Destruct the RSWrapperBase (nothing to do). | |
Protected Types | |
typedef RangeSearch< metric::EuclideanDistance, arma::mat, TreeType > | RSType |
Protected Attributes | |
RSType | rs |
The instantiated RangeSearch object that we are wrapping. | |
RSWrapper is a wrapper class for most RangeSearch types.
|
inlinevirtual |
Create a new RSWrapper that is the same as this one.
This function will properly handle polymorphism.
Implements mlpack::range::RSWrapperBase.
Reimplemented in mlpack::range::LeafSizeRSWrapper< TreeType >.
|
virtual |
Perform bichromatic range search (i.e.
a search with a separate query set). This ignores the leaf size.
Implements mlpack::range::RSWrapperBase.
Reimplemented in mlpack::range::LeafSizeRSWrapper< TreeType >.
|
virtual |
Perform monochromatic range search (i.e.
a search with the reference set as the query set).
Implements mlpack::range::RSWrapperBase.
|
virtual |
Train the model (build the reference tree if needed).
This ignores the leaf size.
Implements mlpack::range::RSWrapperBase.
Reimplemented in mlpack::range::LeafSizeRSWrapper< TreeType >.