mlpack
Public Member Functions | Protected Types | Protected Attributes | List of all members
mlpack::range::RSWrapper< TreeType > Class Template Reference

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

#include <rs_model.hpp>

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

Public Member Functions

 RSWrapper (const bool singleMode, const bool naive)
 Create the RSWrapper object.
 
virtual RSWrapperClone () const
 Create a new RSWrapper that is the same as this one. More...
 
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 Train (arma::mat &&referenceSet, const size_t)
 Train the model (build the reference tree if needed). More...
 
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)
 Perform bichromatic range search (i.e. More...
 
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).
 

Protected Types

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

Protected Attributes

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::RSWrapper< TreeType >

RSWrapper is a wrapper class for most RangeSearch types.

Member Function Documentation

◆ Clone()

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
virtual RSWrapper* mlpack::range::RSWrapper< TreeType >::Clone ( ) const
inlinevirtual

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

This function will properly handle polymorphism.

Implements mlpack::range::RSWrapperBase.

Reimplemented in mlpack::range::LeafSizeRSWrapper< TreeType >.

◆ Search() [1/2]

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
void mlpack::range::RSWrapper< 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   
)
virtual

Perform bichromatic range search (i.e.

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

Implements mlpack::range::RSWrapperBase.

Reimplemented in mlpack::range::LeafSizeRSWrapper< TreeType >.

◆ Search() [2/2]

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
void mlpack::range::RSWrapper< TreeType >::Search ( 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 mlpack::range::RSWrapperBase.

◆ Train()

template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType>
void mlpack::range::RSWrapper< TreeType >::Train ( arma::mat &&  referenceSet,
const size_t   
)
virtual

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

This ignores the leaf size.

Implements mlpack::range::RSWrapperBase.

Reimplemented in mlpack::range::LeafSizeRSWrapper< TreeType >.


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