12#ifndef MLPACK_CORE_TREE_SPILL_TREE_PROJECTION_VECTOR_HPP
13#define MLPACK_CORE_TREE_SPILL_TREE_PROJECTION_VECTOR_HPP
16#include "../bounds.hpp"
44 template<
typename VecType>
57 template<
typename MetricType,
typename ElemType>
70 template<
typename MetricType,
typename VecType>
80 template<
typename Archive>
83 ar & BOOST_SERIALIZATION_NVP(dim);
110 projVect(arma::normalise(vect))
118 template<
typename VecType>
122 return arma::dot(point, projVect);
131 template<
typename MetricType,
typename VecType>
135 typedef typename VecType::elem_type ElemType;
137 const ElemType radius = bound.
Radius();
144 template<
typename Archive>
147 ar & BOOST_SERIALIZATION_NVP(projVect);
Ball bound encloses a set of points at a specific distance (radius) from a specific point (center).
ElemType Radius() const
Get the radius of the ball.
const VecType & Center() const
Get the center point of the ball.
Hyper-rectangle bound for an L-metric.
Simple real-valued range.
AxisParallelProjVector defines an axis-parallel projection vector.
double Project(const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
Project the given point on the projection vector.
math::RangeType< typename VecType::elem_type > Project(const bound::BallBound< MetricType, VecType > &bound) const
Project the given ball bound on the projection vector.
AxisParallelProjVector(size_t dim=0)
Create the projection vector based on the specified dimension.
math::RangeType< ElemType > Project(const bound::HRectBound< MetricType, ElemType > &bound) const
Project the given hrect bound on the projection vector.
void serialize(Archive &ar, const unsigned int)
Serialization.
ProjVector defines a general projection vector (not necessarily axis-parallel).
double Project(const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
Project the given point on the projection vector.
ProjVector(const arma::vec &vect)
Create the projection vector based on the specified vector.
math::RangeType< typename VecType::elem_type > Project(const bound::BallBound< MetricType, VecType > &bound) const
Project the given ball bound on the projection vector.
ProjVector()
Empty Constructor.
void serialize(Archive &ar, const unsigned int)
Serialization.
Linear algebra utility functions, generally performed on matrices or vectors.
typename enable_if< B, T >::type enable_if_t
The core includes that mlpack expects; standard C++ includes and Armadillo.
If value == true, then VecType is some sort of Armadillo vector or subview.