LeafSizeRAWrapper< TreeType > Class Template Reference

LeafSizeRAWrapper wraps any RASearch type that needs to be able to take the leaf size into account when building trees. More...

Inheritance diagram for LeafSizeRAWrapper< TreeType >:

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. More...

 
virtual LeafSizeRAWrapperClone () const
 Return a copy of the LeafSizeRAWrapper. More...

 
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. More...

 
virtual void Train (arma::mat &&referenceSet, const size_t leafSize)
 Train a model with the given parameters. This overload uses leafSize. More...

 
- Public Member Functions inherited from RAWrapper< TreeType >
 RAWrapper (const bool singleMode, const bool naive)
 Construct the RAWrapper object, initializing the internally-held RASearch object. More...

 
virtual ~RAWrapper ()
 Delete the RAWrapper object. More...

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

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

 
const arma::mat & Dataset () const
 Get a reference to the reference set. More...

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

 
bool & FirstLeafExact ()
 Modify whether to do exact search at the first leaf. More...

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

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

 
bool SampleAtLeaves () const
 Get whether to do sampling at leaves. More...

 
bool & SampleAtLeaves ()
 Modify whether to do sampling at leaves. More...

 
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. More...

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

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

 
size_t SingleSampleLimit () const
 Get the single sample limit. More...

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

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

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

 
- Public Member Functions inherited from RAWrapperBase
 RAWrapperBase ()
 Create the RAWrapperBase object. More...

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

 

Additional Inherited Members

- Protected Types inherited from RAWrapper< TreeType >
typedef RASearch< NearestNeighborSort, metric::EuclideanDistance, arma::mat, TreeType > RAType
 
- Protected Attributes inherited from RAWrapper< TreeType >
RAType ra
 The instantiated RASearch object that we are wrapping. More...

 

Detailed Description


template
<
template
<
typename
TreeMetricType
,
typename
TreeStatType
,
typename
TreeMatType
>
class
TreeType
>

class mlpack::neighbor::LeafSizeRAWrapper< TreeType >

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.

Definition at line 208 of file ra_model.hpp.

Constructor & Destructor Documentation

◆ LeafSizeRAWrapper()

LeafSizeRAWrapper ( const bool  singleMode,
const bool  naive 
)
inline

Construct the LeafSizeRAWrapper by delegating to the RAWrapper constructor.

Definition at line 213 of file ra_model.hpp.

◆ ~LeafSizeRAWrapper()

virtual ~LeafSizeRAWrapper ( )
inlinevirtual

Delete the LeafSizeRAWrapper.

Definition at line 220 of file ra_model.hpp.

Member Function Documentation

◆ Clone()

virtual LeafSizeRAWrapper* Clone ( ) const
inlinevirtual

Return a copy of the LeafSizeRAWrapper.

Reimplemented from RAWrapper< TreeType >.

Definition at line 223 of file ra_model.hpp.

References RAWrapperBase::Search(), and RAWrapperBase::Train().

◆ Search()

virtual void Search ( arma::mat &&  querySet,
const size_t  k,
arma::Mat< size_t > &  neighbors,
arma::mat &  distances,
const size_t  leafSize 
)
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 RAWrapper< TreeType >.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the RASearch model.

Definition at line 242 of file ra_model.hpp.

◆ Train()

virtual void Train ( arma::mat &&  referenceSet,
const size_t  leafSize 
)
virtual

Train a model with the given parameters. This overload uses leafSize.

Reimplemented from RAWrapper< TreeType >.


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