13 #ifndef MLPACK_CORE_TREE_BINARY_SPACE_TREE_VANTAGE_POINT_SPLIT_HPP 14 #define MLPACK_CORE_TREE_BINARY_SPACE_TREE_VANTAGE_POINT_SPLIT_HPP 29 template<
typename BoundType,
30 typename MatType = arma::mat,
31 size_t MaxNumSamples = 100>
54 template<
typename VecType>
55 SplitInfo(
const MetricType& metric,
const VecType& vantagePoint,
74 static bool SplitNode(
const BoundType& bound,
97 return split::PerformSplit<MatType, VantagePointSplit>(data, begin, count,
120 std::vector<size_t>& oldFromNew)
122 return split::PerformSplit<MatType, VantagePointSplit>(data, begin, count,
123 splitInfo, oldFromNew);
135 template<
typename VecType>
161 static void SelectVantagePoint(
const MetricType&
metric,
175 #endif // MLPACK_CORE_TREE_BINARY_SPACE_TREE_VANTAGE_POINT_SPLIT_HPP MatType::elem_type ElemType
The matrix element type.
Definition: vantage_point_split.hpp:36
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
static size_t PerformSplit(MatType &data, const size_t begin, const size_t count, const SplitInfo &splitInfo)
Perform the split process according to the information about the split.
Definition: vantage_point_split.hpp:92
ElemType mu
The median distance according to which the node will be split.
Definition: vantage_point_split.hpp:45
The core includes that mlpack expects; standard C++ includes and Armadillo.
static bool SplitNode(const BoundType &bound, MatType &data, const size_t begin, const size_t count, SplitInfo &splitInfo)
Split the node according to the distance to a vantage point.
Definition: vantage_point_split_impl.hpp:24
A struct that contains an information about the split.
Definition: vantage_point_split.hpp:40
static bool AssignToLeftNode(const VecType &point, const SplitInfo &splitInfo)
Indicates that a point should be assigned to the left subtree.
Definition: vantage_point_split.hpp:136
The class splits a binary space partitioning tree node according to the median distance to the vantag...
Definition: vantage_point_split.hpp:32
BoundType::MetricType MetricType
The bounding shape type.
Definition: vantage_point_split.hpp:38
const MetricType * metric
An instance of the MetricType class.
Definition: vantage_point_split.hpp:47
Miscellaneous math random-related routines.
static size_t PerformSplit(MatType &data, const size_t begin, const size_t count, const SplitInfo &splitInfo, std::vector< size_t > &oldFromNew)
Perform the split process according to the information about the split and return the list of changed...
Definition: vantage_point_split.hpp:116
arma::Col< ElemType > vantagePoint
The vantage point.
Definition: vantage_point_split.hpp:43