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>
double Project(const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
Project the given point on the projection vector.
AxisParallelProjVector defines an axis-parallel projection vector.
Linear algebra utility functions, generally performed on matrices or vectors.
arma::vec projVect
Projection vector.
ElemType Radius() const
Get the radius of the ball.
The core includes that mlpack expects; standard C++ includes and Armadillo.
math::RangeType< typename VecType::elem_type > Project(const bound::BallBound< MetricType, VecType > &bound) const
Project the given ball bound on the projection vector.
FirstShim< T > CreateNVP(T &t, const std::string &name, typename std::enable_if_t< HasSerialize< T >::value > *=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.
size_t dim
Dimension considered.
ProjVector defines a general projection vector (not necessarily axis-parallel).
void Serialize(Archive &ar, const unsigned int)
Serialization.
Ball bound encloses a set of points at a specific distance (radius) from a specific point (center)...
ProjVector(const arma::vec &vect)
Create the projection vector based on the specified vector.
void Serialize(Archive &ar, const unsigned int)
Serialization.
Hyper-rectangle bound for an L-metric.
ProjVector()
Empty Constructor.
AxisParallelProjVector(size_t dim=0)
Create the projection vector based on the specified dimension.
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< ElemType > Project(const bound::HRectBound< MetricType, ElemType > &bound) const
Project the given hrect bound on the projection vector.
const VecType & Center() const
Get the center point of the ball.
double Project(const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
Project the given point on the projection vector.
If value == true, then VecType is some sort of Armadillo vector or subview.
typename enable_if< B, T >::type enable_if_t