13#ifndef MLPACK_CORE_TREE_BINARY_SPACE_TREE_VANTAGE_POINT_SPLIT_HPP
14#define MLPACK_CORE_TREE_BINARY_SPACE_TREE_VANTAGE_POINT_SPLIT_HPP
29template<
typename BoundType,
30 typename MatType = arma::mat,
31 size_t MaxNumSamples = 100>
54 template<
typename VecType>
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,
165 size_t& vantagePoint,
173#include "vantage_point_split_impl.hpp"
The class splits a binary space partitioning tree node according to the median distance to the vantag...
MatType::elem_type ElemType
The matrix element type.
BoundType::MetricType MetricType
The bounding shape type.
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.
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.
static bool AssignToLeftNode(const VecType &point, const SplitInfo &splitInfo)
Indicates that a point should be assigned to the left subtree.
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...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Miscellaneous math random-related routines.
A struct that contains an information about the split.
arma::Col< ElemType > vantagePoint
The vantage point.
ElemType mu
The median distance according to which the node will be split.
const MetricType * metric
An instance of the MetricType class.
SplitInfo(const MetricType &metric, const VecType &vantagePoint, ElemType mu)