1#ifndef STRAWBERRY_DMRGINDEXGYMNASTICS
2#define STRAWBERRY_DMRGINDEXGYMNASTICS
12#include "numeric_limits.h"
32template<
typename Symmetry,
typename MatrixType,
typename MatrixType2>
44 auto Routs = Symmetry::reduceSilent(Lin,qloc1);
45 for (
const auto &Rout:Routs)
48 auto qAbra = Abra.
dict.find(cmp1);
49 if (qAbra != Abra.
dict.end())
51 auto Rins = Symmetry::reduceSilent(Lout,qloc2);
52 for (
const auto &Rin:Rins)
55 auto qAket = Aket.
dict.find(cmp2);
56 if (qAket != Aket.
dict.end())
58 auto Rmids = Symmetry::reduceSilent(Lmid,qOp);
59 for (
const auto &Rmid:Rmids)
62 auto qW = W.
dict.find(cmp3);
63 if (qW != W.
dict.end())
67 result.push_back(make_tuple(
qarray3<Symmetry::Nq>{Rin,Rout,Rmid}, qAbra->second, qAket->second, qW->second));
79template<
typename Symmetry,
typename MatrixType,
typename MatrixType2>
91 auto Lins = Symmetry::reduceSilent(Rout,Symmetry::flip(qloc1));
92 for (
const auto& Lin : Lins)
95 auto qAbra = Abra.
dict.find(cmp1);
96 if (qAbra != Abra.
dict.end())
98 auto Louts = Symmetry::reduceSilent(Rin,Symmetry::flip(qloc2));
99 for (
const auto &Lout : Louts)
102 auto qAket = Aket.
dict.find(cmp2);
103 if (qAket != Aket.
dict.end())
105 auto Lmids = Symmetry::reduceSilent(Rmid,Symmetry::flip(qOp));
106 for (
const auto &Lmid : Lmids)
109 auto qW = W.
dict.find(cmp3);
110 if (qW != W.
dict.end())
114 result.push_back(make_tuple(
qarray3<Symmetry::Nq>{Lin,Lout,Lmid}, qAbra->second, qAket->second, qW->second));
126template<
typename Symmetry,
typename MatrixType>
141 auto Rinouts = Symmetry::reduceSilent(Linout,qloc[s]);
143 for (
const auto &Rinout : Rinouts)
146 auto qAket = Aket[s].dict.find(cmp);
148 if (qAket != Aket[s].dict.end())
150 auto qAbra = Abra[s].dict.find(cmp);
152 if (qAbra != Abra[s].dict.end())
162template<
typename Symmetry,
typename MatrixType>
177 auto Linouts = Symmetry::reduceSilent(Rinout, Symmetry::flip(qloc[s]));
179 for (
const auto &Linout : Linouts)
182 auto qAket = Aket[s].dict.find(cmp);
184 if (qAket != Aket[s].dict.end())
186 auto qAbra = Abra[s].dict.find(cmp);
188 if (qAbra != Abra[s].dict.end())
198template<
typename Symmetry,
typename MatrixType,
typename MpoMatrixType>
215 auto qRouts = Symmetry::reduceSilent(Lin, qmerge13);
216 auto qRins = Symmetry::reduceSilent(Lout, qmerge24);
218 auto qWs = Symmetry::reduceSilent(Lmid, qOp12);
220 for (
const auto &qRout:qRouts)
223 auto q13 = AA13.
dict.find(cmp1);
225 if (q13 != AA13.
dict.end())
227 for (
const auto &qRin:qRins)
230 auto q24 = AA24.
dict.find(cmp2);
232 if (q24 != AA24.
dict.end())
234 for (
const auto &qW:qWs)
237 auto qW12 = W12.
dict.find(cmp3);
238 if(qW12 != W12.
dict.end())
240 auto qRmids = Symmetry::reduceSilent(qW, qOp34);
242 for (
const auto &qRmid:qRmids)
245 auto qW34 = W34.
dict.find(cmp4);
246 if(qW34 != W34.
dict.end())
250 result.push_back(make_tuple(
qarray3<Symmetry::Nq>{qRin,qRout,qRmid}, qW, q13->second, q24->second, qW12->second, qW34->second));
264template<
typename Symmetry,
typename Scalar>
265vector<qarray<Symmetry::Nq> >
calc_qsplit (
const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &A1,
267 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &A2,
272 set<qarray<Symmetry::Nq> > qmid_fromL;
273 set<qarray<Symmetry::Nq> > qmid_fromR;
274 vector<qarray<Symmetry::Nq> > A1in;
275 vector<qarray<Symmetry::Nq> > A2out;
278 for (
size_t s1=0; s1<qloc1.size(); ++s1)
279 for (
size_t q=0; q<A1[s1].dim; ++q)
281 A1in.push_back(A1[s1].in[q]);
284 for (
size_t s2=0; s2<qloc2.size(); ++s2)
285 for (
size_t q=0; q<A2[s2].dim; ++q)
287 A2out.push_back(A2[s2].out[q]);
290 for (
size_t s1=0; s1<qloc1.size(); ++s1)
292 auto qls = Symmetry::reduceSilent(A1in, qloc1[s1]);
293 for (
auto const &ql:qls)
295 if (ql<=Qtop and ql>=Qbot)
297 qmid_fromL.insert(ql);
301 for (
size_t s2=0; s2<qloc2.size(); ++s2)
303 auto qrs = Symmetry::reduceSilent(A2out, Symmetry::flip(qloc2[s2]));
304 for (
auto const &qr:qrs)
306 if (qr<=Qtop and qr>=Qbot)
308 qmid_fromR.insert(qr);
313 vector<qarray<Symmetry::Nq> > qres;
317 set_intersection(qmid_fromL.begin(), qmid_fromL.end(), qmid_fromR.begin(), qmid_fromR.end(), back_inserter(qres));
319 sort(qres.begin(), qres.end());
320 qres.erase(unique(qres.begin(), qres.end()), qres.end());
325template<
typename Symmetry,
typename MatrixType>
335 auto qRouts = Symmetry::reduceSilent(Lin, qmerge12);
337 for (
const auto &qRout:qRouts)
340 auto qbra = AAbra[s1s2].dict.find(cmp1);
342 if (qbra != AAbra[s1s2].dict.end())
344 auto qRins = Symmetry::reduceSilent(Lout, qmerge12);
346 for (
const auto &qRin:qRins)
351 auto qket = AAket[s1s2].dict.find(cmp2);
353 if (qket != AAket[s1s2].dict.end())
386template<
typename Symmetry,
typename MatrixType,
typename MpoMatrixType>
397 auto q1 = Abra.
dict.find(cmp1);
399 if (q1 != Abra.
dict.end())
403 auto q2 = Aket.
dict.find(cmp2);
405 if (q2 != Aket.
dict.end())
410 auto qWbot = Wbot.
dict.find(cmp3);
411 if(qWbot != Wbot.
dict.end())
414 auto qWtop = Wtop.
dict.find(cmp4);
415 if(qWtop != Wtop.
dict.end())
417 result = make_tuple(
qarray4<Symmetry::Nq>{qRin,qRout,qRbot,qRtop}, q1->second, q2->second, qWbot->second, qWtop->second);
428template<
typename Symmetry,
typename Scalar>
429void updateInset (
const std::vector<std::array<typename Symmetry::qType,3> > &insetOld,
430 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Abra,
431 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Aket,
434 std::vector<std::array<typename Symmetry::qType,3> > &insetNew)
436 std::array<typename Symmetry::qType,3> qCheck;
438 std::unordered_set<std::array<typename Symmetry::qType,3> > uniqueControl;
441 for (
size_t s1=0; s1<qloc.size(); ++s1)
442 for (
size_t s2=0; s2<qloc.size(); ++s2)
443 for (
size_t k=0; k<qOp.size(); ++k)
445 qCheck = {qloc[s2],qOp[k],qloc[s1]};
446 if(!Symmetry::validate(qCheck)) {
continue;}
447 for(
const auto & [qIn_old,qOut_old,qMid_old] : insetOld)
449 auto qRouts = Symmetry::reduceSilent(qOut_old,Symmetry::flip(qloc[s1]));
450 auto qRins = Symmetry::reduceSilent(qIn_old,Symmetry::flip(qloc[s2]));
451 for(
const auto& qOut_new : qRouts)
452 for(
const auto& qIn_new : qRins)
457 auto q1 = Abra[s1].dict.find(cmp1);
458 auto q2 = Aket[s2].dict.find(cmp2);
460 if (q1!=Abra[s1].dict.end() and
461 q2!=Aket[s2].dict.end())
465 auto qRmids = Symmetry::reduceSilent(qMid_old,Symmetry::flip(qOp[k]));
466 for(
const auto& qMid_new : qRmids)
469 factor_cgc = Symmetry::coeff_buildR(Aket[s2].out[q2->second],qloc[s2],Aket[s2].in[q2->second],
470 qMid_old,qOp[k],qMid_new,
471 Abra[s1].out[q1->second],qloc[s1],Abra[s1].in[q1->second]);
472 if (std::abs(factor_cgc) < ::mynumeric_limits<Scalar>::epsilon()) {
continue; }
473 if(
auto it=uniqueControl.find({qIn_new,qOut_new,qMid_new}) == uniqueControl.end() )
475 uniqueControl.insert({qIn_new,qOut_new,qMid_new});
476 insetNew.push_back({qIn_new,qOut_new,qMid_new});
487template<
typename Symmetry,
typename Scalar,
typename MpoMatrixType>
489 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Abra,
491 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Aket,
492 const Tripod<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > &R,
495 vector<std::array<size_t,2> > &qlhs,
496 vector<vector<std::array<size_t,6> > > &qrhs,
497 vector<vector<Scalar> > &factor_cgcs)
501 unordered_map<std::array<size_t,2>, std::pair<vector<std::array<size_t,6> >, vector<Scalar> > > lookup;
502 std::array<typename Symmetry::qType,3> qCheck;
505 #ifndef DMRG_DONT_USE_OPENMP
506 #ifndef __INTEL_COMPILER
507 #pragma omp parallel for collapse(3)
508 #elif __INTEL_COMPILER
509 #pragma omp parallel for
512 for (
size_t s1=0; s1<qloc.size(); ++s1)
513 for (
size_t s2=0; s2<qloc.size(); ++s2)
514 for (
size_t k=0; k<qOp.size(); ++k)
518 for (
size_t qL=0; qL<L.dim; ++qL)
520 vector<tuple<qarray3<Symmetry::Nq>,size_t,size_t,
size_t> > ix;
521 bool FOUND_MATCH =
LAWA(L.in(qL), L.out(qL), L.mid(qL), qloc[s1], qloc[s2], qOp[k], Abra[s1], Aket[s2], W[s1][s2][k], ix);
523 if (FOUND_MATCH ==
true)
525 for(
size_t n=0; n<ix.size(); ++n)
529 auto qR = R.dict.find(get<0>(ix[n]));
531 if (qR != R.dict.end())
533 bool ALL_BLOCKS_ARE_EMPTY =
true;
534 auto qW = get<3>(ix[n]);
536 for (
int r=0; r<W[s1][s2][k].block[qW].outerSize(); ++r)
537 for (
typename MpoMatrixType::InnerIterator iW(W[s1][s2][k].block[qW],r); iW; ++iW)
539 if (L.block[qL][iW.row()][0].size() != 0 and
540 R.block[qR->second][iW.col()][0].size() != 0)
542 ALL_BLOCKS_ARE_EMPTY =
false;
545 if (ALL_BLOCKS_ARE_EMPTY ==
false)
552 factor_cgc = (Symmetry::NON_ABELIAN)?
553 Symmetry::coeff_HPsi(Aket[s2].in[get<2>(ix[n])], qloc[s2], Aket[s2].out[get<2>(ix[n])],
554 L.mid(qL), qOp[k], get<0>(ix[n])[2],
555 Abra[s1].in[get<1>(ix[n])], qloc[s1], Abra[s1].out[get<1>(ix[n])])
558 if (std::abs(factor_cgc) < std::abs(mynumeric_limits<Scalar>::epsilon())) {
continue;}
560 std::array<size_t,2> key = {s1, get<1>(ix[n])};
561 std::array<size_t,6> val = {s2, get<2>(ix[n]), qL, qR->second, k, qW};
562 #ifndef DMRG_DONT_USE_OPENMP
566 lookup[key].first.push_back(val);
567 lookup[key].second.push_back(factor_cgc);
580 qlhs.reserve(lookup.size());
581 qrhs.reserve(lookup.size());
582 factor_cgcs.reserve(lookup.size());
584 for (
auto it=lookup.begin(); it!=lookup.end(); ++it)
586 qlhs.push_back(it->first);
587 qrhs.push_back((it->second).first);
588 factor_cgcs.push_back((it->second).second);
593template<
typename Symmetry,
typename Scalar,
typename MpoMatrixType>
595 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Abra,
598 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Aket,
599 const Tripod<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > &R,
605 vector<std::array<size_t,2> > &qlhs,
606 vector<vector<std::array<size_t,12> > > &qrhs,
607 vector<vector<Scalar> > &factor_cgcs)
609 unordered_map<std::array<size_t,2>,
610 std::pair<vector<std::array<size_t,12> >, vector<Scalar> > > lookup;
618 for (
size_t qL=0; qL<L.dim; ++qL)
619 for (
const auto &tsd:TSD)
622 bool FOUND_MATCH =
AAWWAA(L.in(qL), L.out(qL), L.mid(qL),
623 qOp12[tsd.k12], qOp34[tsd.k34],
624 tsd.qmerge13, tsd.qmerge24,
625 Abra[tsd.s1s3], Aket[tsd.s2s4], W12[tsd.s1][tsd.s2][tsd.k12], W34[tsd.s3][tsd.s4][tsd.k34], ixs);
629 for (
const auto &ix:ixs)
631 auto qR = R.dict.find(get<0>(ix));
632 auto qW = get<1>(ix);
633 size_t qA13 = get<2>(ix);
634 size_t qA24 = get<3>(ix);
635 size_t qW12 = get<4>(ix);
636 size_t qW34 = get<5>(ix);
639 Scalar factor_cgc6 = (Symmetry::NON_ABELIAN)?
640 Symmetry::coeff_Apair(L.mid(qL), qOp12[tsd.k12], qW,
641 qOp34[tsd.k34], get<0>(ix)[2], tsd.qOp)
646 if (abs(factor_cgc6) < abs(mynumeric_limits<Scalar>::epsilon())) {
continue;}
648 if (qR != R.dict.end())
656 Scalar factor_cgcHPsi = (Symmetry::NON_ABELIAN)?
657 Symmetry::coeff_HPsi(Aket[tsd.s2s4].in[qA24], tsd.qmerge24, Aket[tsd.s2s4].out[qA24],
658 L.mid(qL), tsd.qOp, R.mid(qR->second),
659 Abra[tsd.s1s3].in[qA13], tsd.qmerge13, Abra[tsd.s1s3].out[qA13])
662 std::array<size_t,2> key = {
static_cast<size_t>(tsd.s1s3), qA13};
663 std::array<size_t,12> val = {
static_cast<size_t>(tsd.s2s4), qA24, qL, qR->second,
664 tsd.s1, tsd.s2, tsd.k12, qW12, tsd.s3, tsd.s4, tsd.k34, qW34};
667 lookup[key].first.push_back(val);
668 lookup[key].second.push_back(factor_cgc6 * tsd.cgc9 * factor_cgcHPsi);
686 qlhs.reserve(lookup.size());
687 qrhs.reserve(lookup.size());
688 factor_cgcs.reserve(lookup.size());
690 for (
auto it=lookup.begin(); it!=lookup.end(); ++it)
692 qlhs.push_back(it->first);
693 qrhs.push_back((it->second).first);
694 factor_cgcs.push_back((it->second).second);
699template<
typename Symmetry,
typename Scalar,
typename MpoMatrixType>
701 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Abra,
704 const vector<
Biped<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > > &Aket,
705 const Tripod<Symmetry,Eigen::Matrix<Scalar,Dynamic,Dynamic> > &R,
710 vector<std::array<size_t,2> > &qlhs,
711 vector<vector<std::array<size_t,12> > > &qrhs,
712 vector<vector<Scalar> > &factor_cgcs)
714 unordered_map<std::array<size_t,2>,
715 std::pair<vector<std::array<size_t,12> >, vector<Scalar> > > lookup;
722 for (
size_t s1=0; s1<qloc12.size(); ++s1)
723 for (
size_t s2=0; s2<qloc12.size(); ++s2)
724 for (
size_t k12=0; k12<qOp12.size(); ++k12)
728 for (
size_t s3=0; s3<qloc34.size(); ++s3)
729 for (
size_t s4=0; s4<qloc34.size(); ++s4)
730 for (
size_t k34=0; k34<qOp34.size(); ++k34)
750 auto qOps = Symmetry::reduceSilent(qOp12[k12], qOp34[k34]);
752 for (
const auto &qOp:qOps)
756 auto qmerges13 = Symmetry::reduceSilent(qloc12[s1], qloc34[s3]);
757 auto qmerges24 = Symmetry::reduceSilent(qloc12[s2], qloc34[s4]);
759 for (
const auto &qmerge13:qmerges13)
760 for (
const auto &qmerge24:qmerges24)
775 Scalar factor_cgc9 = (Symmetry::NON_ABELIAN)?
776 Symmetry::coeff_tensorProd(qloc12[s2], qloc34[s4], qmerge24,
777 qOp12[k12], qOp34[k34], qOp,
778 qloc12[s1], qloc34[s3], qmerge13)
780 if (abs(factor_cgc9) < abs(mynumeric_limits<Scalar>::epsilon())) {
continue;}
782 for (
size_t qL=0; qL<L.dim; ++qL)
786 bool FOUND_MATCH =
AAWWAA(L.in(qL), L.out(qL), L.mid(qL),
787 qOp12[k12], qOp34[k34],
789 Abra[s1s3], Aket[s2s4], W12[s1][s2][k12], W34[s3][s4][k34], ixs);
793 for (
const auto &ix:ixs)
795 auto qR = R.dict.find(get<0>(ix));
796 auto qW = get<1>(ix);
797 size_t qA13 = get<2>(ix);
798 size_t qA24 = get<3>(ix);
799 size_t qW12 = get<4>(ix);
800 size_t qW34 = get<5>(ix);
803 Scalar factor_cgc6 = (Symmetry::NON_ABELIAN)?
804 Symmetry::coeff_Apair(L.mid(qL), qOp12[k12], qW,
805 qOp34[k34], get<0>(ix)[2], qOp)
812 if (abs(factor_cgc6) < abs(mynumeric_limits<Scalar>::epsilon())) {
continue;}
814 if (qR != R.dict.end())
822 Scalar factor_cgcHPsi = (Symmetry::NON_ABELIAN)?
823 Symmetry::coeff_HPsi(Aket[s2s4].in[qA24], qmerge24, Aket[s2s4].out[qA24],
824 L.mid(qL), qOp, R.mid(qR->second),
825 Abra[s1s3].in[qA13], qmerge13, Abra[s1s3].out[qA13])
828 std::array<size_t,2> key = {
static_cast<size_t>(s1s3), qA13};
829 std::array<size_t,12> val = {
static_cast<size_t>(s2s4), qA24, qL, qR->second,
830 s1, s2, k12, qW12, s3, s4, k34, qW34};
831 lookup[key].first.push_back(val);
832 lookup[key].second.push_back(factor_cgc6 * factor_cgc9 * factor_cgcHPsi);
846 qlhs.reserve(lookup.size());
847 qrhs.reserve(lookup.size());
848 factor_cgcs.reserve(lookup.size());
850 for (
auto it=lookup.begin(); it!=lookup.end(); ++it)
852 qlhs.push_back(it->first);
853 qrhs.push_back((it->second).first);
854 factor_cgcs.push_back((it->second).second);
bool AWWA(qarray< Symmetry::Nq > Lin, qarray< Symmetry::Nq > Lout, qarray< Symmetry::Nq > Lbot, qarray< Symmetry::Nq > Ltop, qarray< Symmetry::Nq > qloc1, qarray< Symmetry::Nq > qloc2, qarray< Symmetry::Nq > qloc3, qarray< Symmetry::Nq > qOpBot, qarray< Symmetry::Nq > qOpTop, const Biped< Symmetry, MatrixType > &Abra, const Biped< Symmetry, MatrixType > &Aket, const Biped< Symmetry, MpoMatrixType > &Wbot, const Biped< Symmetry, MpoMatrixType > &Wtop, tuple< qarray4< Symmetry::Nq >, size_t, size_t, size_t, size_t > &result)
bool AAWWAA(const qarray< Symmetry::Nq > &Lin, const qarray< Symmetry::Nq > &Lout, const qarray< Symmetry::Nq > &Lmid, const qarray< Symmetry::Nq > &qOp12, const qarray< Symmetry::Nq > &qOp34, const qarray< Symmetry::Nq > &qmerge13, const qarray< Symmetry::Nq > &qmerge24, const Biped< Symmetry, MatrixType > &AA13, const Biped< Symmetry, MatrixType > &AA24, const Biped< Symmetry, MpoMatrixType > &W12, const Biped< Symmetry, MpoMatrixType > &W34, vector< tuple< qarray3< Symmetry::Nq >, qarray< Symmetry::Nq >, size_t, size_t, size_t, size_t > > &result)
bool LAWA(const qarray< Symmetry::Nq > &Lin, const qarray< Symmetry::Nq > &Lout, const qarray< Symmetry::Nq > &Lmid, const qarray< Symmetry::Nq > &qloc1, const qarray< Symmetry::Nq > &qloc2, const qarray< Symmetry::Nq > &qOp, const Biped< Symmetry, MatrixType > &Abra, const Biped< Symmetry, MatrixType > &Aket, const Biped< Symmetry, MatrixType2 > &W, vector< tuple< qarray3< Symmetry::Nq >, size_t, size_t, size_t > > &result)
bool LAA(qarray< Symmetry::Nq > Lin, qarray< Symmetry::Nq > Lout, size_t s, vector< qarray< Symmetry::Nq > > qloc, const vector< Biped< Symmetry, MatrixType > > &Abra, const vector< Biped< Symmetry, MatrixType > > &Aket, vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &result)
vector< qarray< Symmetry::Nq > > calc_qsplit(const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &A1, const vector< qarray< Symmetry::Nq > > &qloc1, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &A2, vector< qarray< Symmetry::Nq > > qloc2, const qarray< Symmetry::Nq > &Qtop, const qarray< Symmetry::Nq > &Qbot)
bool AAAA(qarray< Symmetry::Nq > Lin, qarray< Symmetry::Nq > Lout, size_t s1s2, const qarray< Symmetry::Nq > &qmerge12, const vector< Biped< Symmetry, MatrixType > > &AAbra, const vector< Biped< Symmetry, MatrixType > > &AAket, vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &result)
void precalc_blockStructure(const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &L, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &R, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp, vector< std::array< size_t, 2 > > &qlhs, vector< vector< std::array< size_t, 6 > > > &qrhs, vector< vector< Scalar > > &factor_cgcs)
bool AAR(qarray< Symmetry::Nq > Rin, qarray< Symmetry::Nq > Rout, size_t s, vector< qarray< Symmetry::Nq > > qloc, const vector< Biped< Symmetry, MatrixType > > &Abra, const vector< Biped< Symmetry, MatrixType > > &Aket, vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &result)
void updateInset(const std::vector< std::array< typename Symmetry::qType, 3 > > &insetOld, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp, std::vector< std::array< typename Symmetry::qType, 3 > > &insetNew)
bool AWAR(const qarray< Symmetry::Nq > &Rin, const qarray< Symmetry::Nq > &Rout, const qarray< Symmetry::Nq > &Rmid, const qarray< Symmetry::Nq > &qloc1, const qarray< Symmetry::Nq > &qloc2, const qarray< Symmetry::Nq > &qOp, const Biped< Symmetry, MatrixType > &Abra, const Biped< Symmetry, MatrixType > &Aket, const Biped< Symmetry, MatrixType2 > &W, vector< tuple< qarray3< Symmetry::Nq >, size_t, size_t, size_t > > &result)
Eigen::Index inner_num(const Eigen::Index &outer_num) const
Qbasis< Symmetry > combine(const Qbasis< Symmetry > &other, bool FLIP=false) const
Eigen::Index leftOffset(const qType &qnew, const std::array< qType, 2 > &qold, const std::array< Eigen::Index, 2 > &plain_old) const
void pullData(const vector< Biped< Symmetry, MatrixType > > &A, const Eigen::Index &leg)
Eigen::Index outer_num(const qType &q) const
std::array< qarray< Nq >, 2 > qarray2
std::array< qarray< Nq >, 3 > qarray3
std::array< qarray< Nq >, 4 > qarray4
std::unordered_map< std::array< qType, 2 >, std::size_t > dict