mlpack  master
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > Class Template Reference

A hybrid spill tree is a variant of binary space trees in which the children of a node can "spill over" each other, and contain shared datapoints. More...

Classes

class  SpillDualTreeTraverser
 A generic dual-tree traverser for hybrid spill trees; see spill_dual_tree_traverser.hpp for implementation. More...
 
class  SpillSingleTreeTraverser
 A generic single-tree traverser for hybrid spill trees; see spill_single_tree_traverser.hpp for implementation. More...
 

Public Types

typedef HyperplaneType< MetricType >::BoundType BoundType
 The bound type. More...
 
template<typename RuleType >
using DefeatistDualTreeTraverser = SpillDualTreeTraverser< RuleType, true >
 A defeatist dual-tree traverser for hybrid spill trees. More...
 
template<typename RuleType >
using DefeatistSingleTreeTraverser = SpillSingleTreeTraverser< RuleType, true >
 A defeatist single-tree traverser for hybrid spill trees. More...
 
template<typename RuleType >
using DualTreeTraverser = SpillDualTreeTraverser< RuleType, false >
 A dual-tree traverser for hybrid spill trees. More...
 
typedef MatType::elem_type ElemType
 The type of element held in MatType. More...
 
typedef MatType Mat
 So other classes can use TreeType::Mat. More...
 
template<typename RuleType >
using SingleTreeTraverser = SpillSingleTreeTraverser< RuleType, false >
 A single-tree traverser for hybrid spill trees. More...
 

Public Member Functions

 SpillTree (const MatType &data, const double tau=0, const size_t maxLeafSize=20, const double rho=0.7)
 Construct this as the root node of a hybrid spill tree using the given dataset. More...
 
 SpillTree (MatType &&data, const double tau=0, const size_t maxLeafSize=20, const double rho=0.7)
 Construct this as the root node of a hybrid spill tree using the given dataset. More...
 
 SpillTree (SpillTree *parent, arma::Col< size_t > &points, const double tau=0, const size_t maxLeafSize=20, const double rho=0.7)
 Construct this node as a child of the given parent, including the given list of points. More...
 
 SpillTree (const SpillTree &other)
 Create a hybrid spill tree by copying the other tree. More...
 
 SpillTree (SpillTree &&other)
 Move constructor for a SpillTree; possess all the members of the given tree. More...
 
template<typename Archive >
 SpillTree (Archive &ar, const typename std::enable_if_t< Archive::is_loading::value > *=0)
 Initialize the tree from a boost::serialization archive. More...
 
 ~SpillTree ()
 Deletes this node, deallocating the memory for the children and calling their destructors in turn. More...
 
const BoundTypeBound () const
 Return the bound object for this node. More...
 
BoundTypeBound ()
 Return the bound object for this node. More...
 
void Center (arma::vec &center)
 Store the center of the bounding region in the given vector. More...
 
SpillTreeChild (const size_t child) const
 Return the specified child (0 will be left, 1 will be right). More...
 
SpillTree *& ChildPtr (const size_t child)
 
const MatType & Dataset () const
 Get the dataset which the tree is built on. More...
 
size_t Descendant (const size_t index) const
 Return the index (with reference to the dataset) of a particular descendant of this node. More...
 
ElemType FurthestDescendantDistance () const
 Return the furthest possible descendant distance. More...
 
ElemType FurthestPointDistance () const
 Return the furthest distance to a point held in this node. More...
 
template<typename VecType >
size_t GetFurthestChild (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0)
 Return the index of the furthest child node to the given query point (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the furthest). More...
 
size_t GetFurthestChild (const SpillTree &queryNode)
 Return the index of the furthest child node to the given query node (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the furthest). More...
 
template<typename VecType >
size_t GetNearestChild (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0)
 Return the index of the nearest child node to the given query point (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the nearest). More...
 
size_t GetNearestChild (const SpillTree &queryNode)
 Return the index of the nearest child node to the given query node (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the nearest). More...
 
const HyperplaneType< MetricType > & Hyperplane () const
 Get the Hyperplane instance. More...
 
bool IsLeaf () const
 Return whether or not this node is a leaf (true if it has no children). More...
 
SpillTreeLeft () const
 Gets the left child of this node. More...
 
SpillTree *& Left ()
 Modify the left child of this node. More...
 
ElemType MaxDistance (const SpillTree &other) const
 Return the maximum distance to another node. More...
 
template<typename VecType >
ElemType MaxDistance (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
 Return the maximum distance to another point. More...
 
MetricType Metric () const
 Get the metric that the tree uses. More...
 
ElemType MinDistance (const SpillTree &other) const
 Return the minimum distance to another node. More...
 
template<typename VecType >
ElemType MinDistance (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
 Return the minimum distance to another point. More...
 
ElemType MinimumBoundDistance () const
 Return the minimum distance from the center of the node to any bound edge. More...
 
size_t NumChildren () const
 Return the number of children in this node. More...
 
size_t NumDescendants () const
 Return the number of descendants of this node. More...
 
size_t NumPoints () const
 Return the number of points in this node (0 if not a leaf). More...
 
bool Overlap () const
 Distinguish overlapping nodes from non-overlapping nodes. More...
 
SpillTreeParent () const
 Gets the parent of this node. More...
 
SpillTree *& Parent ()
 Modify the parent of this node. More...
 
ElemType ParentDistance () const
 Return the distance from the center of this node to the center of the parent node. More...
 
ElemTypeParentDistance ()
 Modify the distance from the center of this node to the center of the parent node. More...
 
size_t Point (const size_t index) const
 Return the index (with reference to the dataset) of a particular point in this node. More...
 
math::RangeType< ElemTypeRangeDistance (const SpillTree &other) const
 Return the minimum and maximum distance to another node. More...
 
template<typename VecType >
math::RangeType< ElemTypeRangeDistance (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
 Return the minimum and maximum distance to another point. More...
 
SpillTreeRight () const
 Gets the right child of this node. More...
 
SpillTree *& Right ()
 Modify the right child of this node. More...
 
template<typename Archive >
void Serialize (Archive &ar, const unsigned int version)
 Serialize the tree. More...
 
const StatisticType & Stat () const
 Return the statistic object for this node. More...
 
StatisticType & Stat ()
 Return the statistic object for this node. More...
 

Static Public Member Functions

static bool HasSelfChildren ()
 Returns false: this tree type does not have self children. More...
 

Protected Member Functions

 SpillTree ()
 A default constructor. More...
 

Private Member Functions

void SplitNode (arma::Col< size_t > &points, const size_t maxLeafSize, const double tau, const double rho)
 Splits the current node, assigning its left and right children recursively. More...
 
bool SplitPoints (const double tau, const double rho, const arma::Col< size_t > &points, arma::Col< size_t > &leftPoints, arma::Col< size_t > &rightPoints)
 Split the list of points. More...
 

Private Attributes

BoundType bound
 The bound object for this node. More...
 
size_t count
 The number of points of the dataset contained in this node (and its children). More...
 
const MatType * dataset
 The dataset. More...
 
ElemType furthestDescendantDistance
 The worst possible distance to the furthest descendant, cached to speed things up. More...
 
HyperplaneType< MetricType > hyperplane
 Splitting hyperplane represented by this node. More...
 
SpillTreeleft
 The left child node. More...
 
bool localDataset
 If true, we own the dataset and need to destroy it in the destructor. More...
 
ElemType minimumBoundDistance
 The minimum distance from the center to any edge of the bound. More...
 
bool overlappingNode
 Flag to distinguish overlapping nodes from non-overlapping nodes. More...
 
SpillTreeparent
 The parent node (NULL if this is the root of the tree). More...
 
ElemType parentDistance
 The distance from the centroid of this node to the centroid of the parent. More...
 
arma::Col< size_t > * pointsIndex
 The list of indexes of points contained in this node (non-null for leaf nodes). More...
 
SpillTreeright
 The right child node. More...
 
StatisticType stat
 Any extra data contained in the node. More...
 

Detailed Description

template<typename MetricType, typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
class mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >

A hybrid spill tree is a variant of binary space trees in which the children of a node can "spill over" each other, and contain shared datapoints.

Two new separating planes lplane and rplane are defined, both of which are parallel to the original decision boundary and at a distance tau from it. The region between lplane and rplane is called "overlapping buffer".

For each node, we first split the points considering the overlapping buffer. If either of its children contains more than rho fraction of the total points we undo the overlapping splitting. Instead a conventional partition is used. In this way, we can ensure that each split reduces the number of points of a node by at least a constant factor.

This particular tree does not allow growth, so you cannot add or delete nodes from it. If you need to add or delete a node, the better procedure is to rebuild the tree entirely.

Three runtime parameters are required in the constructor:

For more information on spill trees, see

@inproceedings{
author = {Ting Liu, Andrew W. Moore, Alexander Gray and Ke Yang},
title = {An Investigation of Practical Approximate Nearest Neighbor
Algorithms},
booktitle = {Advances in Neural Information Processing Systems 17},
year = {2005},
pages = {825--832}
}
Template Parameters
MetricTypeThe metric used for tree-building.
StatisticTypeExtra data contained in the node. See statistic.hpp for the necessary skeleton interface.
MatTypeThe dataset class.
HyperplaneTypeThe splitting hyperplane class.
SplitTypeThe class that partitions the dataset/points at a particular node into two parts. Its definition decides the way this split is done.

Definition at line 73 of file spill_tree.hpp.

Member Typedef Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
typedef HyperplaneType<MetricType>::BoundType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::BoundType

The bound type.

Definition at line 81 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename RuleType >
using mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::DefeatistDualTreeTraverser = SpillDualTreeTraverser<RuleType, true>

A defeatist dual-tree traverser for hybrid spill trees.

Definition at line 146 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename RuleType >
using mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::DefeatistSingleTreeTraverser = SpillSingleTreeTraverser<RuleType, true>

A defeatist single-tree traverser for hybrid spill trees.

Definition at line 138 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename RuleType >
using mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::DualTreeTraverser = SpillDualTreeTraverser<RuleType, false>

A dual-tree traverser for hybrid spill trees.

Definition at line 142 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
typedef MatType::elem_type mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ElemType

The type of element held in MatType.

Definition at line 79 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
typedef MatType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Mat

So other classes can use TreeType::Mat.

Definition at line 77 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename RuleType >
using mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SingleTreeTraverser = SpillSingleTreeTraverser<RuleType, false>

A single-tree traverser for hybrid spill trees.

Definition at line 134 of file spill_tree.hpp.

Constructor & Destructor Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( const MatType &  data,
const double  tau = 0,
const size_t  maxLeafSize = 20,
const double  rho = 0.7 
)

Construct this as the root node of a hybrid spill tree using the given dataset.

The dataset will not be modified during the building procedure (unlike BinarySpaceTree).

Parameters
dataDataset to create tree from.
tauOverlapping size.
maxLeafSizeSize of each leaf in the tree.
rhoBalance threshold.
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( MatType &&  data,
const double  tau = 0,
const size_t  maxLeafSize = 20,
const double  rho = 0.7 
)

Construct this as the root node of a hybrid spill tree using the given dataset.

This will take ownership of the data matrix; if you don't want this, consider using the constructor that takes a const reference to a dataset.

Parameters
dataDataset to create tree from.
tauOverlapping size.
maxLeafSizeSize of each leaf in the tree.
rhoBalance threshold.
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > *  parent,
arma::Col< size_t > &  points,
const double  tau = 0,
const size_t  maxLeafSize = 20,
const double  rho = 0.7 
)

Construct this node as a child of the given parent, including the given list of points.

This is used for recursive tree-building by the other constructors which don't specify point indices.

Parameters
parentParent of this node.
pointsVector of indexes of points to be included in this node.
tauOverlapping size.
maxLeafSizeSize of each leaf in the tree.
rhoBalance threshold.
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( const SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &  other)

Create a hybrid spill tree by copying the other tree.

Be careful! This can take a long time and use a lot of memory.

Parameters
othertree to be replicated.
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &&  other)

Move constructor for a SpillTree; possess all the members of the given tree.

Parameters
othertree to be moved.
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename Archive >
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( Archive &  ar,
const typename std::enable_if_t< Archive::is_loading::value > *  = 0 
)

Initialize the tree from a boost::serialization archive.

Parameters
arArchive to load tree from. Must be an iarchive, not an oarchive.
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::~SpillTree ( )

Deletes this node, deallocating the memory for the children and calling their destructors in turn.

This will invalidate any pointers or references to any nodes which are children of this one.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SpillTree ( )
protected

A default constructor.

This is meant to only be used with boost::serialization, which is allowed with the friend declaration below. This does not return a valid tree! The method must be protected, so that the serialization shim can work with the default constructor.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Center().

Member Function Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
const BoundType& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Bound ( ) const
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
BoundType& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Bound ( )
inline

Return the bound object for this node.

Definition at line 232 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::bound.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
void mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Center ( arma::vec &  center)
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Child ( const size_t  child) const

Return the specified child (0 will be left, 1 will be right).

If the index is greater than 1, this will return the right child.

Parameters
childIndex of child to return.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ParentDistance().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree*& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ChildPtr ( const size_t  child)
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
const MatType& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Dataset ( ) const
inline

Get the dataset which the tree is built on.

Definition at line 258 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::dataset.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Descendant ( const size_t  index) const

Return the index (with reference to the dataset) of a particular descendant of this node.

The index should be greater than zero but less than the number of descendants.

Parameters
indexIndex of the descendant.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ChildPtr().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::FurthestDescendantDistance ( ) const

Return the furthest possible descendant distance.

This returns the maximum distance from the centroid to the edge of the bound and not the empirical quantity which is the actual furthest descendant distance. So the actual furthest descendant distance may be less than what this method returns (but it will never be greater than this).

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Metric().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::FurthestPointDistance ( ) const

Return the furthest distance to a point held in this node.

If this is not a leaf node, then the distance is 0 because the node holds no points.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Metric().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename VecType >
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::GetFurthestChild ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
)

Return the index of the furthest child node to the given query point (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the furthest).

If this is a leaf node, it will return NumChildren() (invalid index).

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Metric().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::GetFurthestChild ( const SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &  queryNode)

Return the index of the furthest child node to the given query node (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the furthest).

If it can't decide it will return NumChildren() (invalid index).

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename VecType >
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::GetNearestChild ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
)

Return the index of the nearest child node to the given query point (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the nearest).

If this is a leaf node, it will return NumChildren() (invalid index).

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Metric().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::GetNearestChild ( const SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &  queryNode)

Return the index of the nearest child node to the given query node (this is an efficient estimation based on the splitting hyperplane, the node returned is not necessarily the nearest).

If it can't decide it will return NumChildren() (invalid index).

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
static bool mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::HasSelfChildren ( )
inlinestatic

Returns false: this tree type does not have self children.

Definition at line 421 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
const HyperplaneType<MetricType>& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Hyperplane ( ) const
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
bool mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::IsLeaf ( ) const

Return whether or not this node is a leaf (true if it has no children).

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Stat().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Left ( ) const
inline

Gets the left child of this node.

Definition at line 243 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::left.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree*& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Left ( )
inline

Modify the left child of this node.

Definition at line 245 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::left.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::MaxDistance ( const SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &  other) const
inline

Return the maximum distance to another node.

Definition at line 382 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Bound().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename VecType >
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::MaxDistance ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
) const
inline

Return the maximum distance to another point.

Definition at line 404 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
MetricType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Metric ( ) const
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::MinDistance ( const SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &  other) const
inline

Return the minimum distance to another node.

Definition at line 376 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Bound().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename VecType >
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::MinDistance ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
) const
inline

Return the minimum distance to another point.

Definition at line 395 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::MinimumBoundDistance ( ) const

Return the minimum distance from the center of the node to any bound edge.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Metric().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::NumChildren ( ) const
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::NumDescendants ( ) const

Return the number of descendants of this node.

For a non-leaf spill tree, this is the number of points at the descendant leaves. For a leaf, this is the number of points in the leaf.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ChildPtr().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::NumPoints ( ) const

Return the number of points in this node (0 if not a leaf).

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ChildPtr().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
bool mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Overlap ( ) const
inline

Distinguish overlapping nodes from non-overlapping nodes.

Definition at line 261 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::overlappingNode.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Parent ( ) const
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree*& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Parent ( )
inline

Modify the parent of this node.

Definition at line 255 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::parent.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ParentDistance ( ) const
inline

Return the distance from the center of this node to the center of the parent node.

Definition at line 330 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::parentDistance.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ParentDistance ( )
inline
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Point ( const size_t  index) const

Return the index (with reference to the dataset) of a particular point in this node.

This will happily return invalid indices if the given index is greater than the number of points in this node (obtained with NumPoints()) – be careful.

Parameters
indexIndex of point for which a dataset index is wanted.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ChildPtr().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
math::RangeType<ElemType> mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::RangeDistance ( const SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType > &  other) const
inline

Return the minimum and maximum distance to another node.

Definition at line 388 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Bound().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename VecType >
math::RangeType<ElemType> mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::RangeDistance ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
) const
inline

Return the minimum and maximum distance to another point.

Definition at line 414 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Right ( ) const
inline

Gets the right child of this node.

Definition at line 248 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::right.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree*& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Right ( )
inline

Modify the right child of this node.

Definition at line 250 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::right.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
template<typename Archive >
void mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Serialize ( Archive &  ar,
const unsigned int  version 
)

Serialize the tree.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
void mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SplitNode ( arma::Col< size_t > &  points,
const size_t  maxLeafSize,
const double  tau,
const double  rho 
)
private

Splits the current node, assigning its left and right children recursively.

Parameters
pointsVector of indexes of points to be included in this node.
maxLeafSizeMaximum number of points held in a leaf.
tauOverlapping size.
rhoBalance threshold.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Center().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
bool mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::SplitPoints ( const double  tau,
const double  rho,
const arma::Col< size_t > &  points,
arma::Col< size_t > &  leftPoints,
arma::Col< size_t > &  rightPoints 
)
private

Split the list of points.

Parameters
tauOverlapping size.
rhoBalance threshold.
pointsVector of indexes of points to be included.
leftPointsIndexes of points to be included in left child.
rightPointsIndexes of points to be included in right child.
Returns
Flag to know if the overlapping buffer was included.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Center().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
const StatisticType& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Stat ( ) const
inline

Return the statistic object for this node.

Definition at line 235 of file spill_tree.hpp.

References mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::stat.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
StatisticType& mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Stat ( )
inline

Member Data Documentation

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
BoundType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::bound
private

The bound object for this node.

Definition at line 101 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Bound().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
size_t mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::count
private

The number of points of the dataset contained in this node (and its children).

Definition at line 92 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
const MatType* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::dataset
private

The dataset.

If we are the root of the tree, we own the dataset and must delete it.

Definition at line 113 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Dataset().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::furthestDescendantDistance
private

The worst possible distance to the furthest descendant, cached to speed things up.

Definition at line 108 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
HyperplaneType<MetricType> mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::hyperplane
private

Splitting hyperplane represented by this node.

Definition at line 99 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Hyperplane().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::left
private
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
bool mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::localDataset
private

If true, we own the dataset and need to destroy it in the destructor.

Definition at line 115 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::minimumBoundDistance
private

The minimum distance from the center to any edge of the bound.

Definition at line 110 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
bool mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::overlappingNode
private

Flag to distinguish overlapping nodes from non-overlapping nodes.

Definition at line 97 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Overlap().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::parent
private

The parent node (NULL if this is the root of the tree).

Definition at line 89 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Parent().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
ElemType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::parentDistance
private

The distance from the centroid of this node to the centroid of the parent.

Definition at line 105 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::ParentDistance().

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
arma::Col<size_t>* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::pointsIndex
private

The list of indexes of points contained in this node (non-null for leaf nodes).

Definition at line 95 of file spill_tree.hpp.

template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
SpillTree* mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::right
private
template<typename MetricType , typename StatisticType = EmptyStatistic, typename MatType = arma::mat, template< typename HyperplaneMetricType > class HyperplaneType = AxisOrthogonalHyperplane, template< typename SplitMetricType, typename SplitMatType > class SplitType = MidpointSpaceSplit>
StatisticType mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::stat
private

Any extra data contained in the node.

Definition at line 103 of file spill_tree.hpp.

Referenced by mlpack::tree::SpillTree< MetricType, StatisticType, MatType, HyperplaneType, SplitType >::Stat().


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