mlpack
Public Member Functions | List of all members
mlpack::neighbor::RAWrapperBase Class Referenceabstract

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

#include <ra_model.hpp>

Inheritance diagram for mlpack::neighbor::RAWrapperBase:
Inheritance graph
[legend]

Public Member Functions

 RAWrapperBase ()
 Create the RAWrapperBase object. More...
 
virtual RAWrapperBaseClone () const =0
 Create a new RAWrapperBase that is the same as this one. More...
 
virtual ~RAWrapperBase ()
 Destruct the RAWrapperBase (nothing to do).
 
virtual const arma::mat & Dataset () const =0
 Return a reference to the dataset.
 
virtual size_t SingleSampleLimit () const =0
 Get the single sample limit.
 
virtual size_t & SingleSampleLimit ()=0
 Modify the single sample limit.
 
virtual bool FirstLeafExact () const =0
 Get whether to do exact search at the first leaf.
 
virtual bool & FirstLeafExact ()=0
 Modify whether to do exact search at the first leaf.
 
virtual bool SampleAtLeaves () const =0
 Get whether to do sampling at leaves.
 
virtual bool & SampleAtLeaves ()=0
 Modify whether to do sampling at leaves.
 
virtual double Alpha () const =0
 Get the value of alpha.
 
virtual double & Alpha ()=0
 Modify the value of alpha.
 
virtual double Tau () const =0
 Get the value of tau.
 
virtual double & Tau ()=0
 Modify the value of tau.
 
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 RASearch model with the given parameters.
 
virtual void Search (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 (const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)=0
 Perform monochromatic rank-approximate nearest neighbor search (i.e. 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.

Constructor & Destructor Documentation

◆ RAWrapperBase()

mlpack::neighbor::RAWrapperBase::RAWrapperBase ( )
inline

Create the RAWrapperBase object.

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

Member Function Documentation

◆ Clone()

virtual RAWrapperBase* mlpack::neighbor::RAWrapperBase::Clone ( ) const
pure virtual

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

This function will properly handle polymorphism.

Implemented in mlpack::neighbor::LeafSizeRAWrapper< TreeType >, and mlpack::neighbor::RAWrapper< TreeType >.

◆ Search() [1/2]

virtual void mlpack::neighbor::RAWrapperBase::Search ( 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 mlpack::neighbor::LeafSizeRAWrapper< TreeType >, and mlpack::neighbor::RAWrapper< TreeType >.

◆ Search() [2/2]

virtual void mlpack::neighbor::RAWrapperBase::Search ( 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 mlpack::neighbor::RAWrapper< TreeType >.


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