mlpack
2.0.1
|
Public Types | |
enum | TreeTypes { KD_TREE, COVER_TREE, R_TREE, R_STAR_TREE, BALL_TREE } |
Public Member Functions | |
NSModel (int treeType=TreeTypes::KD_TREE, bool randomBasis=false) | |
Initialize the NSModel with the given type and whether or not a random basis should be used. More... | |
~NSModel () | |
Clean memory, if necessary. More... | |
void | BuildModel (arma::mat &&referenceSet, const size_t leafSize, const bool naive, const bool singleMode) |
Build the reference tree. More... | |
const arma::mat & | Dataset () const |
Expose the dataset. More... | |
size_t | LeafSize () const |
size_t & | LeafSize () |
bool | Naive () const |
bool & | Naive () |
bool | RandomBasis () const |
bool & | RandomBasis () |
void | Search (arma::mat &&querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances) |
Perform neighbor search. The query set will be reordered. More... | |
void | Search (const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances) |
Perform neighbor search. More... | |
template<typename Archive > | |
void | Serialize (Archive &ar, const unsigned int) |
Serialize the neighbor search model. More... | |
bool | SingleMode () const |
Expose singleMode. More... | |
bool & | SingleMode () |
std::string | TreeName () const |
int | TreeType () const |
int & | TreeType () |
Private Types | |
template<template< typename TreeMetricType, typename TreeStatType, typename TreeMatType > class TreeType> | |
using | NSType = NeighborSearch< SortPolicy, metric::EuclideanDistance, arma::mat, TreeType, TreeType< metric::EuclideanDistance, NeighborSearchStat< SortPolicy >, arma::mat >::template DualTreeTraverser > |
Private Attributes | |
NSType< tree::BallTree > * | ballTreeNS |
NSType< tree::StandardCoverTree > * | coverTreeNS |
NSType< tree::KDTree > * | kdTreeNS |
size_t | leafSize |
arma::mat | q |
bool | randomBasis |
NSType< tree::RStarTree > * | rStarTreeNS |
NSType< tree::RTree > * | rTreeNS |
int | treeType |
Definition at line 38 of file neighbor_search.hpp.
|
private |
Definition at line 77 of file ns_model.hpp.
enum mlpack::neighbor::NSModel::TreeTypes |
Enumerator | |
---|---|
KD_TREE | |
COVER_TREE | |
R_TREE | |
R_STAR_TREE | |
BALL_TREE |
Definition at line 51 of file ns_model.hpp.
mlpack::neighbor::NSModel< SortPolicy >::NSModel | ( | int | treeType = TreeTypes::KD_TREE , |
bool | randomBasis = false |
||
) |
Initialize the NSModel with the given type and whether or not a random basis should be used.
mlpack::neighbor::NSModel< SortPolicy >::~NSModel | ( | ) |
Clean memory, if necessary.
void mlpack::neighbor::NSModel< SortPolicy >::BuildModel | ( | arma::mat && | referenceSet, |
const size_t | leafSize, | ||
const bool | naive, | ||
const bool | singleMode | ||
) |
Build the reference tree.
const arma::mat& mlpack::neighbor::NSModel< SortPolicy >::Dataset | ( | ) | const |
Expose the dataset.
|
inline |
Definition at line 110 of file ns_model.hpp.
|
inline |
Definition at line 111 of file ns_model.hpp.
bool mlpack::neighbor::NSModel< SortPolicy >::Naive | ( | ) | const |
bool& mlpack::neighbor::NSModel< SortPolicy >::Naive | ( | ) |
|
inline |
Definition at line 116 of file ns_model.hpp.
|
inline |
Definition at line 117 of file ns_model.hpp.
void mlpack::neighbor::NSModel< SortPolicy >::Search | ( | arma::mat && | querySet, |
const size_t | k, | ||
arma::Mat< size_t > & | neighbors, | ||
arma::mat & | distances | ||
) |
Perform neighbor search. The query set will be reordered.
void mlpack::neighbor::NSModel< SortPolicy >::Search | ( | const size_t | k, |
arma::Mat< size_t > & | neighbors, | ||
arma::mat & | distances | ||
) |
Perform neighbor search.
void mlpack::neighbor::NSModel< SortPolicy >::Serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the neighbor search model.
bool mlpack::neighbor::NSModel< SortPolicy >::SingleMode | ( | ) | const |
Expose singleMode.
bool& mlpack::neighbor::NSModel< SortPolicy >::SingleMode | ( | ) |
std::string mlpack::neighbor::NSModel< SortPolicy >::TreeName | ( | ) | const |
|
inline |
Definition at line 113 of file ns_model.hpp.
|
inline |
Definition at line 114 of file ns_model.hpp.
|
private |
Definition at line 84 of file ns_model.hpp.
|
private |
Definition at line 81 of file ns_model.hpp.
|
private |
Definition at line 80 of file ns_model.hpp.
|
private |
Definition at line 62 of file ns_model.hpp.
|
private |
Definition at line 66 of file ns_model.hpp.
|
private |
Definition at line 65 of file ns_model.hpp.
|
private |
Definition at line 83 of file ns_model.hpp.
|
private |
Definition at line 82 of file ns_model.hpp.
|
private |
Definition at line 61 of file ns_model.hpp.