28 explicit NSphere(
const size_t _n,
29 const double _r = std::numeric_limits<double>::max());
35 explicit NSphere(
const std::vector<double>& _center,
36 const double _r = std::numeric_limits<double>::max());
49 void SetCenter(const std::vector<
double>& _c) noexcept;
52 const std::vector<
double>&
GetCenter() const noexcept;
62 void Translate(const std::vector<
double>& _v) noexcept;
76 bool Contains(const std::vector<
double>& _p) const noexcept;
83 double Clearance(std::vector<
double> _p) const noexcept;
88 std::vector<
double>
ClearancePoint(std::vector<
double> _p) const noexcept;
96 std::vector<
double>
Sample() const;
105 std::vector<
double> m_center;
110 friend std::istream& operator>>(std::istream& _is,
NSphere& _sphere);
116 operator>>(std::istream& _is,
NSphere& _sphere);
119 operator<<(std::ostream& _os, const
NSphere& _sphere);
double GetRadius() const noexcept
Get the radius.
Definition: NSphere.cpp:50
void SetCenter(const std::vector< double > &_c) noexcept
Definition: NSphere.cpp:34
NSphere(const size_t _n, const double _r=std::numeric_limits< double >::max())
Definition: NSphere.cpp:12
double GetVolume() const noexcept
Compute the (hyper)volume or Lebesgue measure.
Definition: NSphere.cpp:73
virtual ~NSphere() noexcept
const std::vector< double > & GetCenter() const noexcept
Get the center point.
Definition: NSphere.cpp:43
std::vector< double > Sample() const
Definition: NSphere.cpp:131
double Clearance(std::vector< double > _p) const noexcept
Definition: NSphere.cpp:91
size_t GetDimension() const noexcept
Get the dimension of this sphere.
Definition: NSphere.cpp:27
std::vector< double > ClearancePoint(std::vector< double > _p) const noexcept
Definition: NSphere.cpp:106
void Translate(const std::vector< double > &_v) noexcept
Definition: NSphere.cpp:64
bool Contains(const std::vector< double > &_p) const noexcept
Definition: NSphere.cpp:84
void SetRadius(const double _r) noexcept
Set the radius.
Definition: NSphere.cpp:57