12 #ifndef MLPACK_METHODS_FASTMKS_FASTMKS_STAT_HPP 13 #define MLPACK_METHODS_FASTMKS_FASTMKS_STAT_HPP 45 template<
typename TreeType>
58 (node.NumChildren() > 0) &&
59 (node.Point(0) == node.Child(0).Point(0)))
61 selfKernel = node.Child(0).Stat().SelfKernel();
65 selfKernel = sqrt(node.Metric().Kernel().Evaluate(
66 node.Dataset().col(node.Point(0)),
67 node.Dataset().col(node.Point(0))));
76 selfKernel = sqrt(node.Metric().Kernel().Evaluate(center, center));
86 double Bound()
const {
return bound; }
88 double&
Bound() {
return bound; }
102 template<
typename Archive>
105 ar(CEREAL_NVP(bound));
106 ar(CEREAL_NVP(selfKernel));
109 if (cereal::is_loading<Archive>())
112 lastKernelNode = NULL;
128 void* lastKernelNode;
double Bound() const
Get the bound.
Linear algebra utility functions, generally performed on matrices or vectors.
FastMKSStat(const TreeType &node)
Initialize this statistic for the given tree node.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void * LastKernelNode() const
Get the address of the node corresponding to the last distance evaluation.
double & SelfKernel()
Modify the self-kernel.
void serialize(Archive &ar, const uint32_t)
Serialize the statistic.
double & LastKernel()
Modify the last kernel evaluation.
double & Bound()
Modify the bound.
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...
double LastKernel() const
Get the last kernel evaluation.
double SelfKernel() const
Get the self-kernel.
The statistic used in trees with FastMKS.
FastMKSStat()
Default initialization.