12 #ifndef MLPACK_METHODS_KDE_STAT_HPP 13 #define MLPACK_METHODS_KDE_STAT_HPP 31 template<
typename TreeType>
37 node.Center(centroid);
42 validCentroid =
false;
51 throw std::logic_error(
"Centroid must be assigned before requesting its " 59 centroid = std::move(newCentroid);
66 template<
typename Archive>
69 ar & BOOST_SERIALIZATION_NVP(centroid);
70 ar & BOOST_SERIALIZATION_NVP(validCentroid);
bool ValidCentroid() const
Get whether the centroid is valid.
const arma::vec & Centroid() const
Get the centroid of the node.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Extra data for each node in the tree for the task of kernel density estimation.
KDEStat(TreeType &node)
Initialization for a fully initialized node.
The TreeTraits class provides compile-time information on the characteristics of a given tree type...
void serialize(Archive &ar, const unsigned int)
Serialize the statistic to/from an archive.
void SetCentroid(arma::vec newCentroid)
Modify the centroid of the node.
KDEStat()
Initialize the statistic.