mlpack
Public Member Functions | List of all members
mlpack::neighbor::NSWrapperBase Class Referenceabstract

NSWrapperBase is a base wrapper class for holding all NeighborSearch types supported by NSModel. More...

#include <ns_model.hpp>

Inheritance diagram for mlpack::neighbor::NSWrapperBase:
Inheritance graph
[legend]

Public Member Functions

 NSWrapperBase ()
 Create the NSWrapperBase object. More...
 
virtual NSWrapperBaseClone () const =0
 Create a new NSWrapperBase that is the same as this one. More...
 
virtual ~NSWrapperBase ()
 Destruct the NSWrapperBase (nothing to do).
 
virtual const arma::mat & Dataset () const =0
 Return a reference to the dataset.
 
virtual NeighborSearchMode SearchMode () const =0
 Get the search mode.
 
virtual NeighborSearchModeSearchMode ()=0
 Modify the search modem.
 
virtual double Epsilon () const =0
 Get the approximation parameter epsilon.
 
virtual double & Epsilon ()=0
 Modify the approximation parameter epsilon.
 
virtual void Train (arma::mat &&referenceSet, const size_t leafSize, const double tau, const double rho)=0
 Train the NeighborSearch model with the given parameters.
 
virtual void Search (arma::mat &&querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances, const size_t leafSize, const double rho)=0
 Perform bichromatic neighbor search (i.e. More...
 
virtual void Search (const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)=0
 Perform monochromatic neighbor search (i.e. More...
 

Detailed Description

NSWrapperBase is a base wrapper class for holding all NeighborSearch types supported by NSModel.

All NeighborSearch type wrappers inherit from this class, allowing a simple interface via inheritance for all the different types we want to support.

Constructor & Destructor Documentation

◆ NSWrapperBase()

mlpack::neighbor::NSWrapperBase::NSWrapperBase ( )
inline

Create the NSWrapperBase object.

The base class does not hold anything, so this constructor does not do anything.

Member Function Documentation

◆ Clone()

virtual NSWrapperBase* mlpack::neighbor::NSWrapperBase::Clone ( ) const
pure virtual

◆ Search() [1/2]

virtual void mlpack::neighbor::NSWrapperBase::Search ( arma::mat &&  querySet,
const size_t  k,
arma::Mat< size_t > &  neighbors,
arma::mat &  distances,
const size_t  leafSize,
const double  rho 
)
pure virtual

◆ Search() [2/2]

virtual void mlpack::neighbor::NSWrapperBase::Search ( const size_t  k,
arma::Mat< size_t > &  neighbors,
arma::mat &  distances 
)
pure virtual

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