mlpack
Public Member Functions | List of all members
mlpack::range::RSWrapperBase Class Referenceabstract

RSWrapperBase is a base wrapper class for holding all RangeSearch types supported by RSModel. More...

#include <rs_model.hpp>

Inheritance diagram for mlpack::range::RSWrapperBase:
Inheritance graph
[legend]

Public Member Functions

 RSWrapperBase ()
 Create the RSWrapperBase object. More...
 
virtual RSWrapperBaseClone () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RSWrapperBase()

mlpack::range::RSWrapperBase::RSWrapperBase ( )
inline

Create the RSWrapperBase object.

The base class does not hold anything, so this constructor does nothing.

Member Function Documentation

◆ Clone()

virtual RSWrapperBase* mlpack::range::RSWrapperBase::Clone ( ) const
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 >.

◆ Search() [1/2]

virtual void mlpack::range::RSWrapperBase::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 
)
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 >.

◆ Search() [2/2]

virtual void mlpack::range::RSWrapperBase::Search ( const math::Range range,
std::vector< std::vector< size_t >> &  neighbors,
std::vector< std::vector< double >> &  distances 
)
pure virtual

Perform monochromatic range search (i.e.

a search with the reference set as the query set).

Implemented in mlpack::range::RSWrapper< TreeType >.


The documentation for this class was generated from the following file: