26 template <std::
size_t dim>
27 WeightedPoint(std::array<double, dim>
const& coords,
double const weight)
30 static_assert(dim <= 3);
32 if constexpr (dim > 0)
42 coords_[i] = std::numeric_limits<double>::quiet_NaN();
50 coords_.fill(std::numeric_limits<double>::quiet_NaN());
63 for (std::size_t comp = 0; comp <
dim_; ++comp)
75 return !(*
this == other);
bool operator==(WeightedPoint const &other) const
std::size_t getDimension() const
The point dimension, i.e., the number of its coordinates.
bool operator!=(WeightedPoint const &other) const
WeightedPoint(double const weight)
Constructs a 0D weighted point.
std::array< double, 3 > coords_
const double * data() const
double operator[](std::size_t coord_idx) const
Access a specific coordinate.
WeightedPoint(std::array< double, dim > const &coords, double const weight)
std::ostream & operator<<(std::ostream &os, const Point3d &p)