12 #ifndef MLPACK_METHODS_KMEANS_DTNN_STATISTIC_HPP 13 #define MLPACK_METHODS_KMEANS_DTNN_STATISTIC_HPP 39 template<
typename TreeType>
52 centroid.zeros(node.Dataset().n_rows);
53 for (
size_t i = 0; i < node.NumPoints(); ++i)
58 node.NumChildren() > 0)
60 centroid += node.Dataset().col(node.Point(i));
63 for (
size_t i = 0; i < node.NumChildren(); ++i)
64 centroid += node.Child(i).NumDescendants() *
65 node.Child(i).Stat().Centroid();
71 for (
size_t i = 0; i < node.NumChildren(); ++i)
Linear algebra utility functions, generally performed on matrices or vectors.
double staticUpperBoundMovement
void * TrueChild(const size_t i) const
void * TrueParent() const
Extra data for each node in the tree.
double & StaticLowerBoundMovement()
double staticLowerBoundMovement
void *& TrueChild(const size_t i)
const arma::vec & Centroid() const
double UpperBound() const
NeighborSearchStat()
Initialize the statistic with the worst possible distance according to our sorting policy...
std::vector< void * > trueChildren
bool StaticPruned() const
DualTreeKMeansStatistic()
double StaticUpperBoundMovement() const
The TreeTraits class provides compile-time information on the characteristics of a given tree type...
double LowerBound() const
size_t NumTrueChildren() const
DualTreeKMeansStatistic(TreeType &node)
double StaticLowerBoundMovement() const
double & StaticUpperBoundMovement()