26 template <std::
size_t dim>
31 static_assert(dim <= 3);
33 if constexpr (dim > 0)
43 coords_[i] = std::numeric_limits<double>::quiet_NaN();
52 coords_.fill(std::numeric_limits<double>::quiet_NaN());
65 for (std::size_t comp = 0; comp <
dim_; ++comp)
77 return !(*
this == other);
80 constexpr const double*
data()
const {
return coords_.data(); }
constexpr bool operator!=(WeightedPoint const &other) const
constexpr const double * data() const
constexpr double operator[](std::size_t coord_idx) const
Access a specific coordinate.
constexpr WeightedPoint(std::array< double, dim > const &coords, double const weight)
constexpr double getWeight() const
constexpr bool operator==(WeightedPoint const &other) const
constexpr std::size_t getDimension() const
The point dimension, i.e., the number of its coordinates.
std::array< double, 3 > coords_
constexpr WeightedPoint(double const weight)
Constructs a 0D weighted point.
std::ostream & operator<<(std::ostream &os, const Point3d &p)