RSWrapperBase Class Referenceabstract

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

Inheritance diagram for RSWrapperBase:

Public Member Functions

 RSWrapperBase ()
 Create the RSWrapperBase object. More...

 
virtual ~RSWrapperBase ()
 Destruct the RSWrapperBase (nothing to do). More...

 
virtual RSWrapperBaseClone () const =0
 Create a new RSWrapperBase that is the same as this one. More...

 
virtual const arma::mat & Dataset () const =0
 Get the dataset. More...

 
virtual bool Naive () const =0
 Get whether naive search is being used. More...

 
virtual bool & Naive ()=0
 Modify whether naive search is being used. More...

 
virtual void Search (util::Timers &timers, 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 (util::Timers &timers, 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...

 
virtual bool SingleMode () const =0
 Get whether single-tree search is being used. More...

 
virtual bool & SingleMode ()=0
 Modify whether single-tree search is being used. More...

 
virtual void Train (util::Timers &timers, arma::mat &&referenceSet, const size_t leafSize)=0
 Train the model (build the reference tree if needed). 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.

Definition at line 34 of file rs_model.hpp.

Constructor & Destructor Documentation

◆ RSWrapperBase()

RSWrapperBase ( )
inline

Create the RSWrapperBase object.

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

Definition at line 39 of file rs_model.hpp.

References RSWrapperBase::Clone().

◆ ~RSWrapperBase()

virtual ~RSWrapperBase ( )
inlinevirtual

Member Function Documentation

◆ Clone()

virtual RSWrapperBase* Clone ( ) const
pure virtual

Create a new RSWrapperBase that is the same as this one.

This function will properly handle polymorphism.

Implemented in LeafSizeRSWrapper< TreeType >, and RSWrapper< TreeType >.

Referenced by RSWrapperBase::RSWrapperBase().

◆ Dataset()

virtual const arma::mat& Dataset ( ) const
pure virtual

Get the dataset.

Implemented in RSWrapper< TreeType >.

Referenced by RSWrapperBase::~RSWrapperBase().

◆ Naive() [1/2]

virtual bool Naive ( ) const
pure virtual

Get whether naive search is being used.

Implemented in RSWrapper< TreeType >.

Referenced by RSWrapperBase::~RSWrapperBase().

◆ Naive() [2/2]

virtual bool& Naive ( )
pure virtual

Modify whether naive search is being used.

Implemented in RSWrapper< TreeType >.

◆ Search() [1/2]

virtual void Search ( util::Timers timers,
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 LeafSizeRSWrapper< TreeType >, and RSWrapper< TreeType >.

Referenced by LeafSizeRSWrapper< TreeType >::Clone(), RSWrapper< TreeType >::Naive(), RSModel::RandomBasis(), and RSWrapperBase::~RSWrapperBase().

◆ Search() [2/2]

virtual void Search ( util::Timers timers,
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 RSWrapper< TreeType >.

◆ SingleMode() [1/2]

virtual bool SingleMode ( ) const
pure virtual

Get whether single-tree search is being used.

Implemented in RSWrapper< TreeType >.

Referenced by RSWrapperBase::~RSWrapperBase().

◆ SingleMode() [2/2]

virtual bool& SingleMode ( )
pure virtual

Modify whether single-tree search is being used.

Implemented in RSWrapper< TreeType >.

◆ Train()

virtual void Train ( util::Timers timers,
arma::mat &&  referenceSet,
const size_t  leafSize 
)
pure virtual

Train the model (build the reference tree if needed).

Implemented in LeafSizeRSWrapper< TreeType >, and RSWrapper< TreeType >.

Referenced by LeafSizeRSWrapper< TreeType >::Clone(), RSWrapper< TreeType >::Naive(), and RSWrapperBase::~RSWrapperBase().


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/methods/range_search/rs_model.hpp