24 #ifndef __MLPACK_CORE_TREE_PERIODICHRECTBOUND_HPP
25 #define __MLPACK_CORE_TREE_PERIODICHRECTBOUND_HPP
37 template<
int t_pow = 2>
72 const arma::vec&
Box()
const {
return box; }
94 void Centroid(arma::vec& centroid)
const;
147 bool Contains(
const arma::vec& point)
const;
163 #include "periodichrectbound_impl.hpp"
165 #endif // __MLPACK_CORE_TREE_PERIODICHRECTBOUND_HPP
PeriodicHRectBound & operator|=(const arma::vec &vector)
Expands this region to include a new point.
std::string ToString() const
Returns a string representation of an object.
double MaxDistance(const arma::vec &point) const
Calculates maximum bound-to-point squared distance in the periodic bound case.
PeriodicHRectBound & operator=(const PeriodicHRectBound &other)
PeriodicHRectBound()
Empty constructor.
void SetBoxSize(arma::vec box)
Modifies the box to the desired dimenstions.
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 MinDistance(const arma::vec &point) const
Calculates minimum bound-to-point squared distance in the periodic bound case.
const arma::vec & Box() const
Returns the box vector.
math::Range & operator[](size_t i)
Sets and gets the range for a particular dimension.
math::Range RangeDistance(const arma::vec &point) const
Calculates minimum and maximum bound-to-point squared distance in the periodic bound case...
Hyper-rectangle bound for an L-metric.
void Centroid(arma::vec ¢roid) const
~PeriodicHRectBound()
Destructor: clean up memory.
Simple real-valued range.