14 #ifndef __MLPACK_METHODS_FASTMKS_FASTMKS_STAT_HPP 15 #define __MLPACK_METHODS_FASTMKS_FASTMKS_STAT_HPP 47 template<
typename TreeType>
60 (node.NumChildren() > 0) &&
61 (node.Point(0) == node.Child(0).Point(0)))
63 selfKernel = node.Child(0).Stat().SelfKernel();
67 selfKernel = sqrt(node.Metric().Kernel().Evaluate(
68 node.Dataset().col(node.Point(0)),
69 node.Dataset().col(node.Point(0))));
78 selfKernel = sqrt(node.Metric().Kernel().Evaluate(center, center));
104 template<
typename Archive>
111 if (Archive::is_loading::value)
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.
FirstShim< T > CreateNVP(T &t, const std::string &name, typename boost::enable_if< HasSerialize< T >>::type *=0)
Call this function to produce a name-value pair; this is similar to BOOST_SERIALIZATION_NVP(), but should be used for types that have a Serialize() function (or contain a type that has a Serialize() function) instead of a serialize() function.
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.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
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 Serialize(Archive &ar, const unsigned int)
Serialize the statistic.
void * LastKernelNode() const
Get the address of the node corresponding to the last distance evaluation.