mlpack
Public Types | Public Member Functions | List of all members
mlpack::tree::HyperplaneBase< BoundT, ProjVectorT > Class Template Reference

HyperplaneBase defines a splitting hyperplane based on a projection vector and projection value. More...

#include <hyperplane.hpp>

Public Types

typedef BoundT BoundType
 Useful typedef for the bound type.
 
typedef ProjVectorT ProjVectorType
 Useful typedef for the projection vector type.
 

Public Member Functions

 HyperplaneBase ()
 Empty Constructor. More...
 
 HyperplaneBase (const ProjVectorType &projVect, double splitVal)
 Create the hyperplane with the specified projection vector and split value. 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 and subtract the split value. More...
 
template<typename VecType >
bool Left (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
 Determine if the given point is to the left of the hyperplane, this means if the projection over the projection vector is negative or zero. More...
 
template<typename VecType >
bool Right (const VecType &point, typename std::enable_if_t< IsVector< VecType >::value > *=0) const
 Determine if the given point is to the right of the hyperplane, this means if the projection over the projection vector is positive. More...
 
bool Left (const BoundType &bound) const
 Determine if the given bound is to the left of the hyperplane. More...
 
bool Right (const BoundType &bound) const
 Determine if the given bound is to the right of the hyperplane. More...
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialization.
 

Detailed Description

template<typename BoundT, typename ProjVectorT>
class mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >

HyperplaneBase defines a splitting hyperplane based on a projection vector and projection value.

Template Parameters
BoundTThe bound type considered.
ProjVectorTType of projection vector (AxisParallelProjVector, ProjVector).

Constructor & Destructor Documentation

◆ HyperplaneBase() [1/2]

template<typename BoundT, typename ProjVectorT>
mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >::HyperplaneBase ( )
inline

Empty Constructor.

By default will consider all points to the left.

◆ HyperplaneBase() [2/2]

template<typename BoundT, typename ProjVectorT>
mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >::HyperplaneBase ( const ProjVectorType projVect,
double  splitVal 
)
inline

Create the hyperplane with the specified projection vector and split value.

Parameters
projVectProjection vector.
splitValSplit value.

Member Function Documentation

◆ Left() [1/2]

template<typename BoundT, typename ProjVectorT>
template<typename VecType >
bool mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >::Left ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
) const
inline

Determine if the given point is to the left of the hyperplane, this means if the projection over the projection vector is negative or zero.

Parameters
pointPoint to be analyzed.

◆ Left() [2/2]

template<typename BoundT, typename ProjVectorT>
bool mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >::Left ( const BoundType bound) const
inline

Determine if the given bound is to the left of the hyperplane.

Parameters
boundBound to be analyzed.

◆ Project()

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

Project the given point on the projection vector and subtract the split value.

Parameters
pointPoint to be projected.

◆ Right() [1/2]

template<typename BoundT, typename ProjVectorT>
template<typename VecType >
bool mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >::Right ( const VecType &  point,
typename std::enable_if_t< IsVector< VecType >::value > *  = 0 
) const
inline

Determine if the given point is to the right of the hyperplane, this means if the projection over the projection vector is positive.

Parameters
pointPoint to be analyzed.

◆ Right() [2/2]

template<typename BoundT, typename ProjVectorT>
bool mlpack::tree::HyperplaneBase< BoundT, ProjVectorT >::Right ( const BoundType bound) const
inline

Determine if the given bound is to the right of the hyperplane.

Parameters
boundBound to be analyzed.

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