LeafSizeNSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType > Class Template Reference

LeafSizeNSWrapper wraps any NeighborSearch types that take a leaf size for tree construction. More...

Inheritance diagram for LeafSizeNSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >:

Public Member Functions

 LeafSizeNSWrapper (const NeighborSearchMode searchMode, const double epsilon)
 Construct the LeafSizeNSWrapper by delegating to the NSWrapper constructor. More...

 
virtual ~LeafSizeNSWrapper ()
 Delete the LeafSizeNSWrapper. More...

 
virtual LeafSizeNSWrapperClone () const
 Return a copy of the LeafSizeNSWrapper. 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, const double)
 Perform bichromatic search (e.g. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the NeighborSearch model. More...

 
virtual void Train (util::Timers &timers, arma::mat &&referenceSet, const size_t leafSize, const double, const double)
 Train a model with the given parameters. More...

 
- Public Member Functions inherited from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >
 NSWrapper (const NeighborSearchMode searchMode, const double epsilon)
 Construct the NSWrapper object, initializing the internally-held NeighborSearch object. More...

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

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

 
double Epsilon () const
 Get epsilon, the approximation parameter. More...

 
double & Epsilon ()
 Modify epsilon, the approximation parameter. More...

 
virtual void Search (util::Timers &timers, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)
 Perform monochromatic neighbor search (i.e. More...

 
NeighborSearchMode SearchMode () const
 Get the search mode. More...

 
NeighborSearchModeSearchMode ()
 Modify the search mode. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the NeighborSearch model. More...

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

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

 

Additional Inherited Members

- Protected Types inherited from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >
typedef NeighborSearch< SortPolicy, metric::EuclideanDistance, arma::mat, TreeType, DualTreeTraversalType, SingleTreeTraversalType > NSType
 
- Protected Attributes inherited from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >
NSType ns
 The instantiated NeighborSearch object that we are wrapping. More...

 

Detailed Description


template<typename SortPolicy, template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType, template< typename RuleType > class DualTreeTraversalType = TreeType<metric::EuclideanDistance, NeighborSearchStat<SortPolicy>, arma::mat>::template DualTreeTraverser, template< typename RuleType > class SingleTreeTraversalType = TreeType<metric::EuclideanDistance, NeighborSearchStat<SortPolicy>, arma::mat>::template SingleTreeTraverser>
class mlpack::neighbor::LeafSizeNSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >

LeafSizeNSWrapper wraps any NeighborSearch types that take a leaf size for tree construction.

The implementations of Train() and Search() take the leaf size into account.

Definition at line 40 of file neighbor_search.hpp.

Constructor & Destructor Documentation

◆ LeafSizeNSWrapper()

LeafSizeNSWrapper ( const NeighborSearchMode  searchMode,
const double  epsilon 
)
inline

Construct the LeafSizeNSWrapper by delegating to the NSWrapper constructor.

Definition at line 205 of file ns_model.hpp.

◆ ~LeafSizeNSWrapper()

virtual ~LeafSizeNSWrapper ( )
inlinevirtual

Delete the LeafSizeNSWrapper.

Definition at line 216 of file ns_model.hpp.

Member Function Documentation

◆ Clone()

virtual LeafSizeNSWrapper* Clone ( ) const
inlinevirtual

◆ Search()

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,
const double   
)
virtual

Perform bichromatic search (e.g.

search with a separate query set). This overload uses the leaf size, but ignores the other parameters.

Reimplemented from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the NeighborSearch model.

Definition at line 244 of file ns_model.hpp.

◆ Train()

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

Train a model with the given parameters.

This overload uses leafSize but ignores the other parameters.

Reimplemented from NSWrapper< SortPolicy, TreeType, DualTreeTraversalType, SingleTreeTraversalType >.


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