mlpack
Public Member Functions | List of all members
mlpack::range::LeafSizeRSWrapper< TreeType > Class Template Reference

Forward declaration. More...

#include <range_search.hpp>

Inheritance diagram for mlpack::range::LeafSizeRSWrapper< TreeType >:
Inheritance graph
[legend]
Collaboration diagram for mlpack::range::LeafSizeRSWrapper< TreeType >:
Collaboration graph
[legend]

Public Member Functions

 LeafSizeRSWrapper (const bool singleMode, const bool naive)
 Construct the LeafSizeRSWrapper by delegating to the RSWrapper constructor. More...
 
virtual ~LeafSizeRSWrapper ()
 Delete the LeafSizeRSWrapper.
 
virtual LeafSizeRSWrapperClone () const
 Return a copy of the LeafSizeRSWrapper.
 
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 math::Range &range, std::vector< std::vector< size_t >> &neighbors, std::vector< std::vector< double >> &distances, const size_t leafSize)
 Perform bichromatic search (e.g. More...
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the RangeSearch model.
 
- Public Member Functions inherited from mlpack::range::RSWrapper< TreeType >
 RSWrapper (const bool singleMode, const bool naive)
 Create the RSWrapper object.
 
virtual ~RSWrapper ()
 Destruct the RSWrapper (nothing to do).
 
const arma::mat & Dataset () const
 Get the dataset.
 
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 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.
 
- Public Member Functions inherited from mlpack::range::RSWrapperBase
 RSWrapperBase ()
 Create the RSWrapperBase object. More...
 
virtual ~RSWrapperBase ()
 Destruct the RSWrapperBase (nothing to do).
 

Additional Inherited Members

- Protected Types inherited from mlpack::range::RSWrapper< TreeType >
typedef RangeSearch< metric::EuclideanDistance, arma::mat, TreeType > RSType
 
- Protected Attributes inherited from mlpack::range::RSWrapper< TreeType >
RSType rs
 The instantiated RangeSearch object that we are wrapping.
 

Detailed Description

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
class mlpack::range::LeafSizeRSWrapper< TreeType >

Forward declaration.

LeafSizeRSWrapper wraps any RangeSearch 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.

Constructor & Destructor Documentation

◆ LeafSizeRSWrapper()

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
mlpack::range::LeafSizeRSWrapper< TreeType >::LeafSizeRSWrapper ( const bool  singleMode,
const bool  naive 
)
inline

Construct the LeafSizeRSWrapper by delegating to the RSWrapper constructor.

Member Function Documentation

◆ Search()

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
void mlpack::range::LeafSizeRSWrapper< TreeType >::Search ( arma::mat &&  querySet,
const math::Range range,
std::vector< std::vector< size_t >> &  neighbors,
std::vector< std::vector< double >> &  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 when building the query tree.

Reimplemented from mlpack::range::RSWrapper< TreeType >.


The documentation for this class was generated from the following files: