15#ifndef MLPACK_CORE_TREE_BINARY_SPACE_TREE_MIDPOINT_SPLIT_HPP
16#define MLPACK_CORE_TREE_BINARY_SPACE_TREE_MIDPOINT_SPLIT_HPP
29template<
typename BoundType,
typename MatType = arma::mat>
77 return split::PerformSplit<MatType, MidpointSplit>(data, begin, count,
100 std::vector<size_t>& oldFromNew)
102 return split::PerformSplit<MatType, MidpointSplit>(data, begin, count,
103 splitInfo, oldFromNew);
112 template<
typename VecType>
124#include "midpoint_split_impl.hpp"
A binary space partitioning tree node is split into its left and right child.
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)
Find the partition of the node.
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.
A struct that contains an information about the split.
size_t splitDimension
The dimension to split the node on.
double splitVal
The split in dimension splitDimension is based on this value.