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>
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>
ElemType Radius() const
Get the radius of the ball.
AxisParallelProjVector defines an axis-parallel projection vector.
FirstShim< T > CreateNVP(T &t, const std::string &name, typename boost::enable_if< HasSerialize< T >>::type *=0)
Call this function to produce a name-value pair; this is similar to BOOST_SERIALIZATION_NVP(), but should be used for types that have a Serialize() function (or contain a type that has a Serialize() function) instead of a serialize() function.
The core includes that mlpack expects; standard C++ includes and Armadillo.
math::RangeType< ElemType > Project(const bound::HRectBound< MetricType, ElemType > &bound) const
Project the given hrect bound on the projection vector.
ProjVector()
Empty Constructor.
ProjVector defines a general projection vector (not necessarily axis-parallel).
Ball bound encloses a set of points at a specific distance (radius) from a specific point (center)...
Hyper-rectangle bound for an L-metric.
AxisParallelProjVector(size_t dim=0)
Create the projection vector based on the specified dimension.
const VecType & Center() const
Get the center point of the ball.
void Serialize(Archive &ar, const unsigned int)
Serialization.
math::RangeType< typename VecType::elem_type > Project(const bound::BallBound< MetricType, VecType > &bound) const
Project the given ball bound 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.
void Serialize(Archive &ar, const unsigned int)
Serialization.
ProjVector(const arma::vec &vect)
Create the projection vector based on the specified vector.
double Project(const VecType &point, typename boost::enable_if< IsVector< VecType > >::type *=0) const
Project the given point on the projection vector.
double Project(const VecType &point, typename boost::enable_if< IsVector< VecType > >::type *=0) const
Project the given point on the projection vector.
If value == true, then VecType is some sort of Armadillo vector or subview.