RAWrapperBase Class Referenceabstract

RAWrapperBase is a base wrapper class for holding all RASearch types supported by RAModel. More...

Inheritance diagram for RAWrapperBase:

Public Member Functions

 RAWrapperBase ()
 Create the RAWrapperBase object. More...

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

 
virtual double Alpha () const =0
 Get the value of alpha. More...

 
virtual double & Alpha ()=0
 Modify the value of alpha. More...

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

 
virtual const arma::mat & Dataset () const =0
 Return a reference to the dataset. More...

 
virtual bool FirstLeafExact () const =0
 Get whether to do exact search at the first leaf. More...

 
virtual bool & FirstLeafExact ()=0
 Modify whether to do exact search at the first leaf. 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 bool SampleAtLeaves () const =0
 Get whether to do sampling at leaves. More...

 
virtual bool & SampleAtLeaves ()=0
 Modify whether to do sampling at leaves. 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)=0
 Perform bichromatic rank-approximate nearest neighbor search (i.e. More...

 
virtual void Search (util::Timers &timers, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)=0
 Perform monochromatic rank-approximate nearest neighbor 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 size_t SingleSampleLimit () const =0
 Get the single sample limit. More...

 
virtual size_t & SingleSampleLimit ()=0
 Modify the single sample limit. More...

 
virtual double Tau () const =0
 Get the value of tau. More...

 
virtual double & Tau ()=0
 Modify the value of tau. More...

 
virtual void Train (util::Timers &timers, arma::mat &&referenceSet, const size_t leafSize)=0
 Train the RASearch model with the given parameters. More...

 

Detailed Description

RAWrapperBase is a base wrapper class for holding all RASearch types supported by RAModel.

All RASearch type wrappers inherit from this class, allowing a simple interface via inheritance for all the different types we want to support.

Definition at line 32 of file ra_model.hpp.

Constructor & Destructor Documentation

◆ RAWrapperBase()

RAWrapperBase ( )
inline

Create the RAWrapperBase object.

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

Definition at line 37 of file ra_model.hpp.

References RAWrapperBase::Clone().

◆ ~RAWrapperBase()

Member Function Documentation

◆ Alpha() [1/2]

virtual double Alpha ( ) const
pure virtual

Get the value of alpha.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::Alpha(), and RAWrapperBase::~RAWrapperBase().

◆ Alpha() [2/2]

virtual double& Alpha ( )
pure virtual

Modify the value of alpha.

Implemented in RAWrapper< TreeType >.

◆ Clone()

virtual RAWrapperBase* Clone ( ) const
pure virtual

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

This function will properly handle polymorphism.

Implemented in LeafSizeRAWrapper< TreeType >, and RAWrapper< TreeType >.

Referenced by RAWrapperBase::RAWrapperBase().

◆ Dataset()

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

Return a reference to the dataset.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::Dataset(), and RAWrapperBase::~RAWrapperBase().

◆ FirstLeafExact() [1/2]

virtual bool FirstLeafExact ( ) const
pure virtual

Get whether to do exact search at the first leaf.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::FirstLeafExact(), and RAWrapperBase::~RAWrapperBase().

◆ FirstLeafExact() [2/2]

virtual bool& FirstLeafExact ( )
pure virtual

Modify whether to do exact search at the first leaf.

Implemented in RAWrapper< TreeType >.

◆ Naive() [1/2]

virtual bool Naive ( ) const
pure virtual

Get whether naive search is being used.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::Naive(), and RAWrapperBase::~RAWrapperBase().

◆ Naive() [2/2]

virtual bool& Naive ( )
pure virtual

Modify whether naive search is being used.

Implemented in RAWrapper< TreeType >.

◆ SampleAtLeaves() [1/2]

virtual bool SampleAtLeaves ( ) const
pure virtual

Get whether to do sampling at leaves.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::SampleAtLeaves(), and RAWrapperBase::~RAWrapperBase().

◆ SampleAtLeaves() [2/2]

virtual bool& SampleAtLeaves ( )
pure virtual

Modify whether to do sampling at leaves.

Implemented in RAWrapper< TreeType >.

◆ Search() [1/2]

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 
)
pure virtual

Perform bichromatic rank-approximate nearest neighbor search (i.e.

search with a separate query set).

Implemented in LeafSizeRAWrapper< TreeType >, and RAWrapper< TreeType >.

Referenced by LeafSizeRAWrapper< TreeType >::Clone(), RAWrapper< TreeType >::Naive(), RAModel::RandomBasis(), and RAWrapperBase::~RAWrapperBase().

◆ Search() [2/2]

virtual void Search ( util::Timers timers,
const size_t  k,
arma::Mat< size_t > &  neighbors,
arma::mat &  distances 
)
pure virtual

Perform monochromatic rank-approximate nearest neighbor search (i.e.

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

Implemented in RAWrapper< TreeType >.

◆ SingleMode() [1/2]

virtual bool SingleMode ( ) const
pure virtual

Get whether single-tree search is being used.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::SingleMode(), and RAWrapperBase::~RAWrapperBase().

◆ SingleMode() [2/2]

virtual bool& SingleMode ( )
pure virtual

Modify whether single-tree search is being used.

Implemented in RAWrapper< TreeType >.

◆ SingleSampleLimit() [1/2]

virtual size_t SingleSampleLimit ( ) const
pure virtual

Get the single sample limit.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::SingleSampleLimit(), and RAWrapperBase::~RAWrapperBase().

◆ SingleSampleLimit() [2/2]

virtual size_t& SingleSampleLimit ( )
pure virtual

Modify the single sample limit.

Implemented in RAWrapper< TreeType >.

◆ Tau() [1/2]

virtual double Tau ( ) const
pure virtual

Get the value of tau.

Implemented in RAWrapper< TreeType >.

Referenced by RAModel::Tau(), and RAWrapperBase::~RAWrapperBase().

◆ Tau() [2/2]

virtual double& Tau ( )
pure virtual

Modify the value of tau.

Implemented in RAWrapper< TreeType >.

◆ Train()

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

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