22 #ifndef __MLPACK_METHODS_FASTMKS_FASTMKS_STAT_HPP
23 #define __MLPACK_METHODS_FASTMKS_FASTMKS_STAT_HPP
55 template<
typename TreeType>
68 (node.NumChildren() > 0) &&
69 (node.Point(0) == node.Child(0).Point(0)))
71 selfKernel = node.Child(0).Stat().SelfKernel();
75 selfKernel = sqrt(node.Metric().Kernel().Evaluate(
76 node.Dataset().unsafe_col(node.Point(0)),
77 node.Dataset().unsafe_col(node.Point(0))));
84 node.Centroid(centroid);
86 selfKernel = sqrt(node.Metric().Kernel().Evaluate(centroid, centroid));
void * lastKernelNode
The node corresponding to the last kernel evaluation.
double lastKernel
The last kernel evaluation.
double LastKernel() const
Get the last kernel evaluation.
double & LastKernel()
Modify the last kernel evaluation.
FastMKSStat(const TreeType &node)
Initialize this statistic for the given tree node.
Linear algebra utility functions, generally performed on matrices or vectors.
double & Bound()
Modify the bound.
double selfKernel
The self-kernel evaluation: sqrt(K(centroid, centroid)).
double bound
The bound for pruning.
double & SelfKernel()
Modify the self-kernel.
FastMKSStat()
Default initialization.
double Bound() const
Get the bound.
double SelfKernel() const
Get the self-kernel.
void *& LastKernelNode()
Modify the address of the node corresponding to the last distance evaluation.
The TreeTraits class provides compile-time information on the characteristics of a given tree type...
The statistic used in trees with FastMKS.
void * LastKernelNode() const
Get the address of the node corresponding to the last distance evaluation.