6#include <unordered_set>
9template <
typename Derived>
12template <
typename Derived>
22 std::vector<qType> vout;
23 for(
const auto& q : ql) {
24 for(
const auto& qmerge : Derived::basis_combine(q, qr)) { vout.push_back(qmerge); }
29 static std::set<qType>
reduceSilent(
const std::vector<qType>& ql,
const std::vector<qType>& qr)
32 for(
const auto& q : ql) {
33 for(
const auto& p : qr) {
34 for(
const auto& qmerge : Derived::basis_combine(q, p)) { vout.insert(qmerge); }
42 auto qtmp = Derived::basis_combine(ql, qm);
46 static std::set<qType>
reduceSilent(
const std::set<qType>& ql,
const std::vector<qType>& qr)
49 for(
const auto q : ql) {
50 for(
const auto& p : qr) {
51 for(
const auto qp : Derived::basis_combine(q, p)) { out.insert(qp); }
57 static std::set<qType>
reduceSilent(
const std::unordered_set<qType>& ql,
const std::vector<qType>& qr)
60 for(
const auto q : ql) {
61 for(
const auto& p : qr) {
62 for(
const auto qp : Derived::basis_combine(q, p)) { out.insert(qp); }
70 return std::signbit(Derived::coeff_recouple(q, Derived::conj(q), q, q, Derived::qvacuum(), Derived::qvacuum())) ?
Scalar(-1) :
Scalar(1.);
75 return std::sqrt(Derived::degeneracy(qr)) * Derived::coeff_recouple(ql, qr, Derived::conj(qr), ql, qf, Derived::qvacuum());
78 template <std::
size_t M>
79 static bool compare(
const std::array<qType, M>& q1,
const std::array<qType, M>& q2)
81 for(std::size_t m = 0; m <
M; m++) {
84 }
else if(q1[m] < q2[m]) {
96 for(
const auto& q : q12) {
97 if(q == q3) {
return true; }
Definition: CombSym.hpp:8
@ M
Definition: functions.hpp:39
Definition: SymBase.hpp:14
static std::vector< qType > reduceSilent(const qType &ql, const qType &qr)
Definition: SymBase.hpp:18
static std::vector< qType > reduceSilent(const qType &ql, const qType &qm, const qType &qr)
Definition: SymBase.hpp:40
static Scalar coeff_FS(const qType &q)
Definition: SymBase.hpp:68
SymTraits< Derived >::qType qType
Definition: SymBase.hpp:15
static bool triangle(const qType &q1, const qType &q2, const qType &q3)
Definition: SymBase.hpp:93
static std::set< qType > reduceSilent(const std::set< qType > &ql, const std::vector< qType > &qr)
Definition: SymBase.hpp:46
static std::set< qType > reduceSilent(const std::vector< qType > &ql, const std::vector< qType > &qr)
Definition: SymBase.hpp:29
static bool compare(const qType &q1, const qType &q2)
Definition: SymBase.hpp:91
static std::vector< qType > reduceSilent(const std::vector< qType > &ql, const qType &qr)
Definition: SymBase.hpp:20
SymTraits< Derived >::Scalar Scalar
Definition: SymBase.hpp:16
static Scalar coeff_turn(const qType &ql, const qType &qr, const qType &qf)
Definition: SymBase.hpp:73
static bool compare(const std::array< qType, M > &q1, const std::array< qType, M > &q2)
Definition: SymBase.hpp:79
static std::set< qType > reduceSilent(const std::unordered_set< qType > &ql, const std::vector< qType > &qr)
Definition: SymBase.hpp:57
Definition: SymBase.hpp:10