mlpack
|
LeafSizeRAWrapper wraps any RASearch type that needs to be able to take the leaf size into account when building trees. More...
#include <ra_model.hpp>
Public Member Functions | |
LeafSizeRAWrapper (const bool singleMode, const bool naive) | |
Construct the LeafSizeRAWrapper by delegating to the RAWrapper constructor. More... | |
virtual | ~LeafSizeRAWrapper () |
Delete the LeafSizeRAWrapper. | |
virtual LeafSizeRAWrapper * | Clone () const |
Return a copy of the LeafSizeRAWrapper. | |
virtual void | Train (arma::mat &&referenceSet, const size_t leafSize) |
Train a model with the given parameters. This overload uses leafSize. | |
virtual void | Search (arma::mat &&querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances, const size_t leafSize) |
Perform bichromatic search (e.g. More... | |
template<typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the RASearch model. | |
![]() | |
RAWrapper (const bool singleMode, const bool naive) | |
Construct the RAWrapper object, initializing the internally-held RASearch object. More... | |
virtual | ~RAWrapper () |
Delete the RAWrapper object. | |
const arma::mat & | Dataset () const |
Get a reference to the reference set. | |
size_t | SingleSampleLimit () const |
Get the single sample limit. | |
size_t & | SingleSampleLimit () |
Modify the single sample limit. | |
bool | FirstLeafExact () const |
Get whether to do exact search at the first leaf. | |
bool & | FirstLeafExact () |
Modify whether to do exact search at the first leaf. | |
bool | SampleAtLeaves () const |
Get whether to do sampling at leaves. | |
bool & | SampleAtLeaves () |
Modify whether to do sampling at leaves. | |
double | Alpha () const |
Get the value of alpha. | |
double & | Alpha () |
Modify the value of alpha. | |
double | Tau () const |
Get the value of tau. | |
double & | Tau () |
Modify the value of tau. | |
bool | SingleMode () const |
Get whether single-tree search is being used. | |
bool & | SingleMode () |
Modify whether single-tree search is being used. | |
bool | Naive () const |
Get whether naive search is being used. | |
bool & | Naive () |
Modify whether naive search is being used. | |
virtual void | Search (const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances) |
Perform monochromatic neighbor search (i.e. More... | |
template<typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the RASearch model. | |
![]() | |
RAWrapperBase () | |
Create the RAWrapperBase object. More... | |
virtual | ~RAWrapperBase () |
Destruct the RAWrapperBase (nothing to do). | |
Additional Inherited Members | |
![]() | |
typedef RASearch< NearestNeighborSort, metric::EuclideanDistance, arma::mat, TreeType > | RAType |
![]() | |
RAType | ra |
The instantiated RASearch object that we are wrapping. | |
LeafSizeRAWrapper wraps any RASearch type that needs to be able to take the leaf size into account when building trees.
The implementations of Train() and bichromatic Search() take this leaf size into account.
|
inline |
Construct the LeafSizeRAWrapper by delegating to the RAWrapper constructor.
|
virtual |
Perform bichromatic search (e.g.
search with a separate query set). This overload takes the leaf size into account to build the query tree.
Reimplemented from mlpack::neighbor::RAWrapper< TreeType >.