RSWrapper< TreeType > Class Template Reference

RSWrapper is a wrapper class for most RangeSearch types. More...

Inheritance diagram for RSWrapper< TreeType >:

Public Member Functions

 RSWrapper (const bool singleMode, const bool naive)
 Create the RSWrapper object. More...

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

 
virtual RSWrapperClone () const
 Create a new RSWrapper that is the same as this one. More...

 
const arma::mat & Dataset () const
 Get the dataset. More...

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

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

 
virtual void Search (util::Timers &timers, arma::mat &&querySet, const math::Range &range, std::vector< std::vector< size_t >> &neighbors, std::vector< std::vector< double >> &distances, const size_t)
 Perform bichromatic range search (i.e. More...

 
virtual void Search (util::Timers &timers, const math::Range &range, std::vector< std::vector< size_t >> &neighbors, std::vector< std::vector< double >> &distances)
 Perform monochromatic range search (i.e. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the RangeSearch 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...

 
virtual void Train (util::Timers &timers, arma::mat &&referenceSet, const size_t)
 Train the model (build the reference tree if needed). More...

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

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

 

Protected Types

typedef RangeSearch< metric::EuclideanDistance, arma::mat, TreeType > RSType
 

Protected Attributes

RSType rs
 The instantiated RangeSearch object that we are wrapping. More...

 

Detailed Description


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

class mlpack::range::RSWrapper< TreeType >

RSWrapper is a wrapper class for most RangeSearch types.

Definition at line 89 of file rs_model.hpp.

Member Typedef Documentation

◆ RSType

typedef RangeSearch<metric::EuclideanDistance, arma::mat, TreeType> RSType
protected

Definition at line 149 of file rs_model.hpp.

Constructor & Destructor Documentation

◆ RSWrapper()

RSWrapper ( const bool  singleMode,
const bool  naive 
)
inline

Create the RSWrapper object.

Definition at line 93 of file rs_model.hpp.

◆ ~RSWrapper()

virtual ~RSWrapper ( )
inlinevirtual

Destruct the RSWrapper (nothing to do).

Definition at line 104 of file rs_model.hpp.

Member Function Documentation

◆ Clone()

virtual RSWrapper* Clone ( ) const
inlinevirtual

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

This function will properly handle polymorphism.

Implements RSWrapperBase.

Reimplemented in LeafSizeRSWrapper< TreeType >.

Definition at line 101 of file rs_model.hpp.

◆ Dataset()

const arma::mat& Dataset ( ) const
inlinevirtual

Get the dataset.

Implements RSWrapperBase.

Definition at line 107 of file rs_model.hpp.

◆ Naive() [1/2]

bool Naive ( ) const
inlinevirtual

Get whether naive search is being used.

Implements RSWrapperBase.

Definition at line 115 of file rs_model.hpp.

◆ Naive() [2/2]

bool& Naive ( )
inlinevirtual

Modify whether naive search is being used.

Implements RSWrapperBase.

Definition at line 117 of file rs_model.hpp.

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

◆ Search() [1/2]

virtual void Search ( util::Timers timers,
arma::mat &&  querySet,
const math::Range range,
std::vector< std::vector< size_t >> &  neighbors,
std::vector< std::vector< double >> &  distances,
const size_t   
)
virtual

Perform bichromatic range search (i.e.

a search with a separate query set). This ignores the leaf size.

Implements RSWrapperBase.

Reimplemented in LeafSizeRSWrapper< TreeType >.

◆ Search() [2/2]

virtual void Search ( util::Timers timers,
const math::Range range,
std::vector< std::vector< size_t >> &  neighbors,
std::vector< std::vector< double >> &  distances 
)
virtual

Perform monochromatic range search (i.e.

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

Implements RSWrapperBase.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the RangeSearch model.

Definition at line 143 of file rs_model.hpp.

◆ SingleMode() [1/2]

bool SingleMode ( ) const
inlinevirtual

Get whether single-tree search is being used.

Implements RSWrapperBase.

Definition at line 110 of file rs_model.hpp.

◆ SingleMode() [2/2]

bool& SingleMode ( )
inlinevirtual

Modify whether single-tree search is being used.

Implements RSWrapperBase.

Definition at line 112 of file rs_model.hpp.

◆ Train()

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

Train the model (build the reference tree if needed).

This ignores the leaf size.

Implements RSWrapperBase.

Reimplemented in LeafSizeRSWrapper< TreeType >.

Member Data Documentation

◆ rs

RSType rs
protected

The instantiated RangeSearch object that we are wrapping.

Definition at line 152 of file rs_model.hpp.


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