mlpack
|
RSWrapperBase is a base wrapper class for holding all RangeSearch types supported by RSModel. More...
#include <rs_model.hpp>
Public Member Functions | |
RSWrapperBase () | |
Create the RSWrapperBase object. More... | |
virtual RSWrapperBase * | Clone () const =0 |
Create a new RSWrapperBase that is the same as this one. More... | |
virtual | ~RSWrapperBase () |
Destruct the RSWrapperBase (nothing to do). | |
virtual const arma::mat & | Dataset () const =0 |
Get the dataset. | |
virtual bool | SingleMode () const =0 |
Get whether single-tree search is being used. | |
virtual bool & | SingleMode ()=0 |
Modify whether single-tree search is being used. | |
virtual bool | Naive () const =0 |
Get whether naive search is being used. | |
virtual bool & | Naive ()=0 |
Modify whether naive search is being used. | |
virtual void | Train (arma::mat &&referenceSet, const size_t leafSize)=0 |
Train the model (build the reference tree if needed). | |
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 leafSize)=0 |
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)=0 |
Perform monochromatic range search (i.e. More... | |
RSWrapperBase is a base wrapper class for holding all RangeSearch types supported by RSModel.
All RangeSearch type wrappers inherit from this class, allowing a simple interface via inheritance for all the different types we want to support.
|
inline |
Create the RSWrapperBase object.
The base class does not hold anything, so this constructor does nothing.
|
pure virtual |
Create a new RSWrapperBase that is the same as this one.
This function will properly handle polymorphism.
Implemented in mlpack::range::LeafSizeRSWrapper< TreeType >, and mlpack::range::RSWrapper< TreeType >.
|
pure virtual |
Perform bichromatic range search (i.e.
a search with a separate query set).
Implemented in mlpack::range::LeafSizeRSWrapper< TreeType >, and mlpack::range::RSWrapper< TreeType >.
|
pure virtual |
Perform monochromatic range search (i.e.
a search with the reference set as the query set).
Implemented in mlpack::range::RSWrapper< TreeType >.