18 #ifndef INCLUDE_SYMMETRIES_CONSTEXPR_ANGLES_H
19 #define INCLUDE_SYMMETRIES_CONSTEXPR_ANGLES_H
24 namespace Molassembler {
36 template<
unsigned long size>
37 constexpr
double makeElement(
38 const std::array<Temple::Vector, size>& positions,
42 const auto indexPair = Temple::UpperTriangularMatrixImpl::index_conversion::toDoubleIndex<size>(i);
46 positions[indexPair.first],
47 positions[indexPair.second]
59 template<
unsigned long size,
size_t... Inds>
60 constexpr std::array<double,
size * (
size - 1) / 2> makeArrayImpl(
61 const std::array<Temple::Vector, size>& positions,
62 std::integer_sequence<size_t, Inds...>
65 return {{ makeElement(positions, Inds)... }};
78 template<
unsigned long size>
79 constexpr std::array<double,
size * (
size - 1) / 2> makeArray(
80 const std::array<Temple::Vector, size>& positions
84 std::make_index_sequence<
size * (
size - 1) / 2>{}
unsigned size(const Shape shape)
Fetch the number of vertices of a shape.
PURITY_WEAK constexpr double angle(const Vector &a, const Vector &b)
Constexpr binary angle in radians calculation.
Definition: Vector.h:143
Matrix-like class that stores only upper triangular part.