mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::tree::AxisParallelProjVector Class Reference

AxisParallelProjVector defines an axis-parallel projection vector. More...

Public Member Functions

 AxisParallelProjVector (size_t dim=0)
 Create the projection vector based on the specified dimension. More...
 
template<typename VecType >
double Project (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
 Project the given point on the projection vector. More...
 
template<typename MetricType , typename ElemType >
math::RangeType< ElemType > Project (const bound::HRectBound< MetricType, ElemType > &bound) const
 Project the given hrect bound on the projection vector. More...
 
template<typename MetricType , typename VecType >
math::RangeType< typename VecType::elem_type > Project (const bound::BallBound< MetricType, VecType > &bound) const
 Project the given ball bound on the projection vector. More...
 
template<typename Archive >
void Serialize (Archive &ar, const unsigned int)
 Serialization. More...
 

Private Attributes

size_t dim
 Dimension considered. More...
 

Detailed Description

AxisParallelProjVector defines an axis-parallel projection vector.

We can efficiently project points, simply analyzing a specific dimension.

Definition at line 24 of file projection_vector.hpp.

Constructor & Destructor Documentation

mlpack::tree::AxisParallelProjVector::AxisParallelProjVector ( size_t  dim = 0)
inline

Create the projection vector based on the specified dimension.

Parameters
dimDimension to be considered.

Definition at line 35 of file projection_vector.hpp.

Member Function Documentation

template<typename VecType >
double mlpack::tree::AxisParallelProjVector::Project ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
) const
inline

Project the given point on the projection vector.

Parameters
pointPoint to be projected.

Definition at line 45 of file projection_vector.hpp.

References dim.

Referenced by mlpack::tree::ProjVector::Project().

template<typename MetricType , typename ElemType >
math::RangeType<ElemType> mlpack::tree::AxisParallelProjVector::Project ( const bound::HRectBound< MetricType, ElemType > &  bound) const
inline

Project the given hrect bound on the projection vector.

Parameters
boundBound to be projected.
Returns
Range of projected values.

Definition at line 58 of file projection_vector.hpp.

References dim.

template<typename MetricType , typename VecType >
math::RangeType<typename VecType::elem_type> mlpack::tree::AxisParallelProjVector::Project ( const bound::BallBound< MetricType, VecType > &  bound) const
inline

Project the given ball bound on the projection vector.

Parameters
boundBound to be projected.
Returns
Range of projected values.

Definition at line 71 of file projection_vector.hpp.

References dim.

template<typename Archive >
void mlpack::tree::AxisParallelProjVector::Serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialization.

Definition at line 81 of file projection_vector.hpp.

References mlpack::data::CreateNVP().

Member Data Documentation

size_t mlpack::tree::AxisParallelProjVector::dim
private

Dimension considered.

Definition at line 27 of file projection_vector.hpp.

Referenced by Project().


The documentation for this class was generated from the following file: