23 #ifndef __MLPACK_CORE_TREE_BALLBOUND_HPP
24 #define __MLPACK_CORE_TREE_BALLBOUND_HPP
37 template<
typename VecType = arma::vec>
64 radius(radius), center(center) { }
82 bool Contains(
const VecType& point)
const;
138 template<
typename MatType>
151 #include "ballbound_impl.hpp"
153 #endif // __MLPACK_CORE_TREE_DBALLBOUND_HPP
VecType & Center()
Modify the center point of the ball.
BallBound(const double radius, const VecType ¢er)
Create the ball bound with the specified radius and center.
math::Range operator[](const size_t i) const
double Radius() const
Get the radius of the ball.
BallBound(const size_t dimension)
Create the ball bound with the specified dimensionality.
double MinDistance(const VecType &point) const
Calculates minimum bound-to-point squared distance.
const BallBound & operator|=(const BallBound &other)
Expand the bound to include the given node.
Ball bound that works in the regular Euclidean metric space.
double & Radius()
Modify the radius of the ball.
const VecType & Center() const
Get the center point of the ball.
bool Contains(const VecType &point) const
Determines if a point is within this bound.
double MaxDistance(const VecType &point) const
Computes maximum distance.
math::Range RangeDistance(const VecType &other) const
Calculates minimum and maximum bound-to-point distance.
std::string ToString() const
Returns a string representation of this object.
void CalculateMidpoint(VecType ¢roid) const
Gets the center.
Simple real-valued range.