RAWrapperBase is a base wrapper class for holding all RASearch types supported by RAModel. More...
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 RAWrapperBase * | Clone () 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... | |
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.
|
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().
|
inlinevirtual |
Destruct the RAWrapperBase (nothing to do).
Definition at line 44 of file ra_model.hpp.
References RAWrapperBase::Alpha(), RAWrapperBase::Dataset(), RAWrapperBase::FirstLeafExact(), RAWrapperBase::Naive(), RAWrapperBase::SampleAtLeaves(), RAWrapperBase::Search(), RAWrapperBase::SingleMode(), RAWrapperBase::SingleSampleLimit(), RAWrapperBase::Tau(), and RAWrapperBase::Train().
|
pure virtual |
Get the value of alpha.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::Alpha(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify the value of alpha.
Implemented in RAWrapper< TreeType >.
|
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().
|
pure virtual |
Return a reference to the dataset.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::Dataset(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Get whether to do exact search at the first leaf.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::FirstLeafExact(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify whether to do exact search at the first leaf.
Implemented in RAWrapper< TreeType >.
|
pure virtual |
Get whether naive search is being used.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::Naive(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify whether naive search is being used.
Implemented in RAWrapper< TreeType >.
|
pure virtual |
Get whether to do sampling at leaves.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::SampleAtLeaves(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify whether to do sampling at leaves.
Implemented in RAWrapper< TreeType >.
|
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().
|
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 >.
|
pure virtual |
Get whether single-tree search is being used.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::SingleMode(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify whether single-tree search is being used.
Implemented in RAWrapper< TreeType >.
|
pure virtual |
Get the single sample limit.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::SingleSampleLimit(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify the single sample limit.
Implemented in RAWrapper< TreeType >.
|
pure virtual |
Get the value of tau.
Implemented in RAWrapper< TreeType >.
Referenced by RAModel::Tau(), and RAWrapperBase::~RAWrapperBase().
|
pure virtual |
Modify the value of tau.
Implemented in RAWrapper< TreeType >.
|
pure virtual |
Train the RASearch model with the given parameters.
Implemented in LeafSizeRAWrapper< TreeType >, and RAWrapper< TreeType >.
Referenced by LeafSizeRAWrapper< TreeType >::Clone(), RAWrapper< TreeType >::Naive(), and RAWrapperBase::~RAWrapperBase().