HyperplaneBase< BoundT, ProjVectorT > Class Template Reference

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

Public Types

typedef BoundT BoundType
 Useful typedef for the bound type. More...

 
typedef ProjVectorT ProjVectorType
 Useful typedef for the projection vector type. More...

 

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
>
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...

 
bool Left (const BoundType &bound) const
 Determine if the given bound is to the left of the hyperplane. 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 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 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 unsigned int)
 Serialization. More...

 

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).

Definition at line 30 of file hyperplane.hpp.

Member Typedef Documentation

◆ BoundType

typedef BoundT BoundType

Useful typedef for the bound type.

Definition at line 34 of file hyperplane.hpp.

◆ ProjVectorType

typedef ProjVectorT ProjVectorType

Useful typedef for the projection vector type.

Definition at line 36 of file hyperplane.hpp.

Constructor & Destructor Documentation

◆ HyperplaneBase() [1/2]

HyperplaneBase ( )
inline

Empty Constructor.

By default will consider all points to the left.

Definition at line 49 of file hyperplane.hpp.

◆ HyperplaneBase() [2/2]

HyperplaneBase ( const ProjVectorType projVect,
double  splitVal 
)
inline

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

Parameters
projVectProjection vector.
splitValSplit value.

Definition at line 59 of file hyperplane.hpp.

Member Function Documentation

◆ Left() [1/2]

bool 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.

Definition at line 86 of file hyperplane.hpp.

References HyperplaneBase< BoundT, ProjVectorT >::Project().

◆ Left() [2/2]

bool Left ( const BoundType bound) const
inline

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

Parameters
pointBound to be analyzed.

Definition at line 110 of file hyperplane.hpp.

◆ Project()

double 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.

Definition at line 71 of file hyperplane.hpp.

Referenced by HyperplaneBase< BoundT, ProjVectorT >::Left(), and HyperplaneBase< BoundT, ProjVectorT >::Right().

◆ Right() [1/2]

bool 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.

Definition at line 99 of file hyperplane.hpp.

References HyperplaneBase< BoundT, ProjVectorT >::Project().

◆ Right() [2/2]

bool Right ( const BoundType bound) const
inline

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

Parameters
pointBound to be analyzed.

Definition at line 122 of file hyperplane.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialization.

Definition at line 133 of file hyperplane.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.2.1/src/mlpack/core/tree/space_split/hyperplane.hpp