mlpack::bound::PeriodicHRectBound< t_pow > Class Template Reference

Hyper-rectangle bound for an L-metric. More...

Collaboration diagram for mlpack::bound::PeriodicHRectBound< t_pow >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PeriodicHRectBound (const PeriodicHRectBound &other)
 PeriodicHRectBound (arma::vec box)
 Specifies the box size.
 PeriodicHRectBound ()
 Empty constructor.
 ~PeriodicHRectBound ()
 Destructor: clean up memory.
const arma::vec & Box () const
 Returns the box vector.
void Centroid (arma::vec &centroid) const
void Clear ()
 Resets all dimensions to the empty set.
bool Contains (const arma::vec &point) const
 Determines if a point is within this bound.
size_t Dim () const
 Gets the dimensionality.
double MaxDistance (const PeriodicHRectBound &other) const
 Computes maximum bound-to-bound squared distance in the periodic bound case.
double MaxDistance (const arma::vec &point) const
 Calculates maximum bound-to-point squared distance in the periodic bound case.
double MinDistance (const PeriodicHRectBound &other) const
 Calculates minimum bound-to-bound squared distance in the periodic bound case.
double MinDistance (const arma::vec &point) const
 Calculates minimum bound-to-point squared distance in the periodic bound case.
PeriodicHRectBoundoperator= (const PeriodicHRectBound &other)
const math::Range operator[] (size_t i) const
math::Rangeoperator[] (size_t i)
 Sets and gets the range for a particular dimension.
PeriodicHRectBoundoperator|= (const PeriodicHRectBound &other)
 Expands this region to encompass another bound.
PeriodicHRectBoundoperator|= (const arma::vec &vector)
 Expands this region to include a new point.
math::Range RangeDistance (const PeriodicHRectBound &other) const
 Calculates minimum and maximum bound-to-bound squared distance in the periodic bound case.
math::Range RangeDistance (const arma::vec &point) const
 Calculates minimum and maximum bound-to-point squared distance in the periodic bound case.
void SetBoxSize (arma::vec box)
 Modifies the box to the desired dimenstions.
std::string ToString () const
 Returns a string representation of an object.

Private Attributes

math::Rangebounds
arma::vec box
size_t dim

Detailed Description

template<int t_pow = 2>
class mlpack::bound::PeriodicHRectBound< t_pow >

Hyper-rectangle bound for an L-metric.

Template parameter t_pow is the metric to use; use 2 for Euclidean (L2).

Definition at line 38 of file periodichrectbound.hpp.


Constructor & Destructor Documentation

template<int t_pow = 2>
mlpack::bound::PeriodicHRectBound< t_pow >::PeriodicHRectBound (  ) 

Empty constructor.

template<int t_pow = 2>
mlpack::bound::PeriodicHRectBound< t_pow >::PeriodicHRectBound ( arma::vec  box  ) 

Specifies the box size.

The dimensionality is set to the same of the box size, and the bounds are initialized to be empty.

template<int t_pow = 2>
mlpack::bound::PeriodicHRectBound< t_pow >::PeriodicHRectBound ( const PeriodicHRectBound< t_pow > &  other  ) 
template<int t_pow = 2>
mlpack::bound::PeriodicHRectBound< t_pow >::~PeriodicHRectBound (  ) 

Destructor: clean up memory.


Member Function Documentation

template<int t_pow = 2>
const arma::vec& mlpack::bound::PeriodicHRectBound< t_pow >::Box (  )  const [inline]

Returns the box vector.

Definition at line 72 of file periodichrectbound.hpp.

template<int t_pow = 2>
void mlpack::bound::PeriodicHRectBound< t_pow >::Centroid ( arma::vec &  centroid  )  const
template<int t_pow = 2>
void mlpack::bound::PeriodicHRectBound< t_pow >::Clear (  ) 

Resets all dimensions to the empty set.

template<int t_pow = 2>
bool mlpack::bound::PeriodicHRectBound< t_pow >::Contains ( const arma::vec &  point  )  const

Determines if a point is within this bound.

template<int t_pow = 2>
size_t mlpack::bound::PeriodicHRectBound< t_pow >::Dim (  )  const [inline]

Gets the dimensionality.

Definition at line 80 of file periodichrectbound.hpp.

References mlpack::bound::PeriodicHRectBound< t_pow >::dim.

template<int t_pow = 2>
double mlpack::bound::PeriodicHRectBound< t_pow >::MaxDistance ( const PeriodicHRectBound< t_pow > &  other  )  const

Computes maximum bound-to-bound squared distance in the periodic bound case.

template<int t_pow = 2>
double mlpack::bound::PeriodicHRectBound< t_pow >::MaxDistance ( const arma::vec &  point  )  const

Calculates maximum bound-to-point squared distance in the periodic bound case.

template<int t_pow = 2>
double mlpack::bound::PeriodicHRectBound< t_pow >::MinDistance ( const PeriodicHRectBound< t_pow > &  other  )  const

Calculates minimum bound-to-bound squared distance in the periodic bound case.

Example: bound1.MinDistance(other) for minimum squared distance.

template<int t_pow = 2>
double mlpack::bound::PeriodicHRectBound< t_pow >::MinDistance ( const arma::vec &  point  )  const

Calculates minimum bound-to-point squared distance in the periodic bound case.

template<int t_pow = 2>
PeriodicHRectBound& mlpack::bound::PeriodicHRectBound< t_pow >::operator= ( const PeriodicHRectBound< t_pow > &  other  ) 
template<int t_pow = 2>
const math::Range mlpack::bound::PeriodicHRectBound< t_pow >::operator[] ( size_t  i  )  const
template<int t_pow = 2>
math::Range& mlpack::bound::PeriodicHRectBound< t_pow >::operator[] ( size_t  i  ) 

Sets and gets the range for a particular dimension.

template<int t_pow = 2>
PeriodicHRectBound& mlpack::bound::PeriodicHRectBound< t_pow >::operator|= ( const PeriodicHRectBound< t_pow > &  other  ) 

Expands this region to encompass another bound.

template<int t_pow = 2>
PeriodicHRectBound& mlpack::bound::PeriodicHRectBound< t_pow >::operator|= ( const arma::vec &  vector  ) 

Expands this region to include a new point.

template<int t_pow = 2>
math::Range mlpack::bound::PeriodicHRectBound< t_pow >::RangeDistance ( const PeriodicHRectBound< t_pow > &  other  )  const

Calculates minimum and maximum bound-to-bound squared distance in the periodic bound case.

template<int t_pow = 2>
math::Range mlpack::bound::PeriodicHRectBound< t_pow >::RangeDistance ( const arma::vec &  point  )  const

Calculates minimum and maximum bound-to-point squared distance in the periodic bound case.

template<int t_pow = 2>
void mlpack::bound::PeriodicHRectBound< t_pow >::SetBoxSize ( arma::vec  box  ) 

Modifies the box to the desired dimenstions.

template<int t_pow = 2>
std::string mlpack::bound::PeriodicHRectBound< t_pow >::ToString (  )  const

Returns a string representation of an object.


Member Data Documentation

template<int t_pow = 2>
math::Range* mlpack::bound::PeriodicHRectBound< t_pow >::bounds [private]

Definition at line 155 of file periodichrectbound.hpp.

template<int t_pow = 2>
arma::vec mlpack::bound::PeriodicHRectBound< t_pow >::box [private]

Definition at line 157 of file periodichrectbound.hpp.

template<int t_pow = 2>
size_t mlpack::bound::PeriodicHRectBound< t_pow >::dim [private]

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

Generated on 13 Aug 2014 for MLPACK by  doxygen 1.6.1