MLPACK  1.0.4
Public Member Functions | Private Attributes
mlpack::tree::MRKDStatistic Class Reference

Statistic for multi-resolution kd-trees. More...

Collaboration diagram for mlpack::tree::MRKDStatistic:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MRKDStatistic ()
 Initialize an empty statistic.
template<typename MatType >
 MRKDStatistic (const MatType &dataset, const size_t begin, const size_t count)
 This constructor is called when a leaf is created.
template<typename MatType >
 MRKDStatistic (const MatType &dataset, const size_t begin, const size_t count, MRKDStatistic &leftStat, MRKDStatistic &rightStat)
 This constructor is called when a non-leaf node is created.
size_t Begin () const
 Get the index of the initial item in the dataset.
size_t & Begin ()
 Modify the index of the initial item in the dataset.
const arma::colvec & CenterOfMass () const
 Get the center of mass.
arma::colvec & CenterOfMass ()
 Modify the center of mass.
size_t Count () const
 Get the number of items in the dataset.
size_t & Count ()
 Modify the number of items in the dataset.
size_t DominatingCentroid () const
 Get the index of the dominating centroid.
size_t & DominatingCentroid ()
 Modify the index of the dominating centroid.
std::string ToString () const
 Returns a string representation of this object.
const std::vector< size_t > & Whitelist () const
 Access the whitelist.
std::vector< size_t > & Whitelist ()
 Modify the whitelist.

Private Attributes

size_t begin
 The initial item in the dataset, so we don't have to make a copy.
arma::colvec centerOfMass
 The center of mass for this dataset.
size_t count
 The number of items in the dataset.
const arma::mat * dataset
 The data points this object contains.
size_t dominatingCentroid
 The index of the dominating centroid of the associated hyperrectangle.
bool isWhitelistValid
 Whether or not the whitelist is valid.
const MRKDStatisticleftStat
 The left child.
const MRKDStatisticparentStat
 A link to the parent node; NULL if this is the root.
const MRKDStatisticrightStat
 The right child.
double sumOfSquaredNorms
 The sum of the squared Euclidian norms for this dataset.
std::vector< size_t > whitelist
 The list of centroids that cannot own this hyperrectangle.

Detailed Description

Statistic for multi-resolution kd-trees.

Definition at line 33 of file mrkd_statistic.hpp.


Constructor & Destructor Documentation

Initialize an empty statistic.

template<typename MatType >
mlpack::tree::MRKDStatistic::MRKDStatistic ( const MatType &  dataset,
const size_t  begin,
const size_t  count 
)

This constructor is called when a leaf is created.

Parameters:
datasetMatrix that the tree is being built on.
beginStarting index corresponding to this leaf.
countNumber of points held in this leaf.
template<typename MatType >
mlpack::tree::MRKDStatistic::MRKDStatistic ( const MatType &  dataset,
const size_t  begin,
const size_t  count,
MRKDStatistic leftStat,
MRKDStatistic rightStat 
)

This constructor is called when a non-leaf node is created.

This lets you build fast bottom-up statistics when building trees.

Parameters:
datasetMatrix that the tree is being built on.
beginStarting index corresponding to this leaf.
countNumber of points held in this leaf.
leftStatMRKDStatistic object of the left child node.
rightStatMRKDStatistic object of the right child node.

Member Function Documentation

size_t mlpack::tree::MRKDStatistic::Begin ( ) const [inline]

Get the index of the initial item in the dataset.

Definition at line 74 of file mrkd_statistic.hpp.

References begin.

size_t& mlpack::tree::MRKDStatistic::Begin ( ) [inline]

Modify the index of the initial item in the dataset.

Definition at line 76 of file mrkd_statistic.hpp.

References begin.

const arma::colvec& mlpack::tree::MRKDStatistic::CenterOfMass ( ) const [inline]

Get the center of mass.

Definition at line 84 of file mrkd_statistic.hpp.

References centerOfMass.

arma::colvec& mlpack::tree::MRKDStatistic::CenterOfMass ( ) [inline]

Modify the center of mass.

Definition at line 86 of file mrkd_statistic.hpp.

References centerOfMass.

size_t mlpack::tree::MRKDStatistic::Count ( ) const [inline]

Get the number of items in the dataset.

Definition at line 79 of file mrkd_statistic.hpp.

References count.

size_t& mlpack::tree::MRKDStatistic::Count ( ) [inline]

Modify the number of items in the dataset.

Definition at line 81 of file mrkd_statistic.hpp.

References count.

Get the index of the dominating centroid.

Definition at line 89 of file mrkd_statistic.hpp.

References dominatingCentroid.

Modify the index of the dominating centroid.

Definition at line 91 of file mrkd_statistic.hpp.

References dominatingCentroid.

Returns a string representation of this object.

const std::vector<size_t>& mlpack::tree::MRKDStatistic::Whitelist ( ) const [inline]

Access the whitelist.

Definition at line 94 of file mrkd_statistic.hpp.

References whitelist.

std::vector<size_t>& mlpack::tree::MRKDStatistic::Whitelist ( ) [inline]

Modify the whitelist.

Definition at line 96 of file mrkd_statistic.hpp.

References whitelist.


Member Data Documentation

The initial item in the dataset, so we don't have to make a copy.

Definition at line 102 of file mrkd_statistic.hpp.

Referenced by Begin().

The center of mass for this dataset.

Definition at line 114 of file mrkd_statistic.hpp.

Referenced by CenterOfMass().

The number of items in the dataset.

Definition at line 104 of file mrkd_statistic.hpp.

Referenced by Count().

const arma::mat* mlpack::tree::MRKDStatistic::dataset [private]

The data points this object contains.

Definition at line 100 of file mrkd_statistic.hpp.

The index of the dominating centroid of the associated hyperrectangle.

Definition at line 120 of file mrkd_statistic.hpp.

Referenced by DominatingCentroid().

Whether or not the whitelist is valid.

Definition at line 125 of file mrkd_statistic.hpp.

The left child.

Definition at line 106 of file mrkd_statistic.hpp.

A link to the parent node; NULL if this is the root.

Definition at line 110 of file mrkd_statistic.hpp.

The right child.

Definition at line 108 of file mrkd_statistic.hpp.

The sum of the squared Euclidian norms for this dataset.

Definition at line 116 of file mrkd_statistic.hpp.

std::vector<size_t> mlpack::tree::MRKDStatistic::whitelist [private]

The list of centroids that cannot own this hyperrectangle.

Definition at line 123 of file mrkd_statistic.hpp.

Referenced by Whitelist().


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