26 #ifndef SEMISIMPLEALGEBRA_H_INCLUDED 27 #define SEMISIMPLEALGEBRA_H_INCLUDED 32 #include <initializer_list> 150 Irrep highestWeightRep(
const AlgebraState& highestWeight,
bool mult =
true)
const;
161 Irrep highestWeightRep(
const std::vector<int>& highestWeight,
bool mult =
true)
const;
169 Irrep getTrivialRep()
const;
172 Irrep getDefiningRep()
const;
186 bool mult =
true)
const;
190 bool mult =
true)
const;
194 bool mult =
true)
const;
197 bool mult =
true)
const;
208 void sortRep(std::vector<AlgebraState>& rep,
209 std::vector<int>& mult)
const;
216 int getOrderL()
const;
238 void setCartanMatrix() = 0;
245 void setSquaredNorm() = 0;
260 static bool isPositiveRoot(
const std::vector<int>& root);
269 static bool isPositiveWeight(
const AlgebraState& state);
318 std::vector<int> weylReflection(
int simpleRoot,
319 const std::vector<int>& root)
const;
336 std::vector<int> weylReflection(
int simpleRoot1,
337 int simpleRoot2)
const;
345 void invertCartanMatrix();
355 void generateWeylGroup();
419 AlgebraState applyAnnihilationOperator(
const std::vector<int>& root,
439 AlgebraState applyCreationOperator(
const std::vector<int>& root,
453 std::vector<AlgebraState> getSingleChain(
455 int direction)
const;
457 void getSingleChainExperimental(
459 std::vector<AlgebraState> &states,
460 std::vector<std::vector<bool>> &directionExplored,
461 int direction)
const;
480 std::vector<AlgebraState> getRootChain(
482 std::vector<AlgebraState> states
483 = std::vector<AlgebraState>(0),
484 std::vector<std::vector<bool> > directions
485 = std::vector<std::vector<bool> >(0))
const;
487 void getRootChainExperimental(
489 std::vector<AlgebraState> &states,
490 std::vector<std::vector<bool> > &directions)
const;
503 void computeMultiplicity(std::vector<int>& multiplicities,
504 const std::vector<AlgebraState>& rep,
513 std::vector<int> multiplicities(std::vector<AlgebraState>& rep)
const;
606 std::vector<std::pair<AlgebraState, Irrep>> irreps;
608 mutable std::vector<IndexData> indices;
649 void setCartanMatrix()
override;
655 void setSquaredNorm()
override;
664 bool mult =
true)
const override;
672 const std::vector<int>& highestWeight,
673 bool mult =
true)
const override;
689 bool mult =
true)
const override;
697 void sortRep(std::vector<mty::AlgebraState>& rep,
698 std::vector<int>& mult)
const override;
727 void setCartanMatrix()
override;
729 void setSquaredNorm()
override;
760 void setCartanMatrix()
override;
762 void setSquaredNorm()
override;
789 void setCartanMatrix()
override;
791 void setSquaredNorm()
override;
818 void setCartanMatrix()
override;
820 void setSquaredNorm()
override;
845 void setCartanMatrix()
override;
847 void setSquaredNorm()
override;
872 void setCartanMatrix()
override;
874 void setSquaredNorm()
override;
899 void setCartanMatrix()
override;
901 void setSquaredNorm()
override;
926 void setCartanMatrix()
override;
928 void setSquaredNorm()
override;
953 void setCartanMatrix()
override;
955 void setSquaredNorm()
override;
968 std::ostream& operator<<(std::ostream& fout, const std::vector<T>& vec)
970 for (
const auto& el : vec)
978 int findInVector(
const std::vector<T>& v,
981 const typename std::vector<T>::const_iterator iter
982 = find(v.begin(), v.end(), element);
984 return distance(v.begin(), iter);
989 int binaryFindInVector(
const std::vector<T>& v,
995 const auto middleIndex = (a+b) / 2;
996 const auto middle = v[middleIndex];
997 if (element < middle) {
1000 else if (middle < element) {
1009 template<
typename T>
1010 bool addCarefully(std::vector<T>& vec,
1013 if (findInVector<T>(vec,element) == -1) {
1014 vec.push_back(element);
1020 template<
typename T>
1021 std::vector<T>
operator+(
const std::vector<T>& x,
1022 const std::vector<T>& y)
1024 if (x.size() != y.size()) {
1025 std::cout <<
"Type: two std::vectors must have " 1026 <<
"the same dimension in product.\n";
1029 std::vector<T> rep(x.size());
1030 for (
size_t i=0; i!=x.size(); ++i)
1036 template<
typename T>
1037 std::vector<T>
operator-(
const std::vector<T>& x,
1038 const std::vector<T>& y)
1040 if (x.size() != y.size()) {
1041 std::cout <<
"Type: two std::vectors must have " 1042 <<
"the same dimension in product.\n";
1045 std::vector<T> rep(x.size());
1046 for (
size_t i=0; i!=x.size(); ++i)
1052 template<
typename T>
1053 std::vector<T>
operator-(
const std::vector<T>& x)
1055 std::vector<T> rep(x);
1056 for (
auto& el : rep)
1061 template<
typename T>
1063 const std::vector<T>& x)
1065 std::vector<T> rep(x);
1066 for (
auto& el : rep)
1071 template<
typename T>
1072 std::vector<T>
operator*(
const std::vector<T>& x,
1075 std::vector<T> rep(x);
1076 for (
auto& el : rep)
1081 template<
typename T>
1083 const std::vector<T>& y)
1085 if (x.size() != y.size()) {
1086 std::cout <<
"Type: two std::vectors must have " 1087 <<
"the same dimension in product.\n";
1091 for (
size_t i=0; i!=x.size(); ++i)
1098 template<
typename T>
1099 std::vector<T>
operator*(
const std::vector<std::vector<T>>&
A,
1100 const std::vector<T>& x)
1103 return std::vector<T>(0);
1104 if (
A[0].size() != x.size()) {
1105 std::cout <<
"Type: two std::vectors must have " 1106 <<
"the same dimension in product.\n";
1109 std::vector<T> rep(
A.size(),0);
1110 for (
size_t i=0; i!=
A.size(); ++i)
1111 for (
size_t j=0; j!=x.size(); ++j)
1112 rep[i] +=
A[i][j]*x[j];
1117 template<
typename T>
1118 std::vector<T>
operator*(
const std::vector<T> &x,
1119 const std::vector<std::vector<T>>&
A)
1122 return std::vector<T>(0);
1123 if (
A[0].size() != x.size()) {
1124 std::cout <<
"Type: two std::vectors must have " 1125 <<
"the same dimension in product.\n";
1128 std::vector<T> rep(
A.size(),0);
1129 for (
size_t i=0; i!=
A.size(); ++i)
1130 for (
size_t j=0; j!=x.size(); ++j)
1131 rep[i] +=
A[i][j]*x[j];
1136 template<
typename T>
1137 std::vector<std::vector<T> >
operator*(
const std::vector<std::vector<T>>&
A,
1138 const std::vector<std::vector<T>>&
B)
1140 if (
A.size() == 0 or
B.size() == 0) {
1141 return std::vector<std::vector<T> >(0);
1143 if (
A[0].size() !=
B.size()) {
1144 std::cout <<
"Type: two std::vectors must have " 1145 <<
"the same dimension in product.\n";
1148 std::vector<std::vector<T> > rep(
A.size(), std::vector<T>(
B[0].size(),0));
1149 for (
size_t i=0; i!=
A.size(); ++i)
1150 for (
size_t j=0; j!=
B[0].size(); ++j)
1151 for (
size_t k=0; k!=
A[0].size(); ++k)
1152 rep[i][j] +=
A[i][k]*
B[k][j];
Semi-simple Lie algebra D(l) == so(2l).
Definition: semiSimpleAlgebra.h:800
~B()
Destructor.
Definition: semiSimpleAlgebra.h:756
csl::Expr inverseCartan
Inverse cartan matrix.
Definition: semiSimpleAlgebra.h:586
~G2()
Destructor.
Definition: semiSimpleAlgebra.h:949
csl::vector_expr symbolicSquaredNorms
Symbolic version of squaredNorm.
Definition: semiSimpleAlgebra.h:603
~A()
Destructor.
Definition: semiSimpleAlgebra.h:723
virtual ~SemiSimpleAlgebra()
Destructor.
Definition: semiSimpleAlgebra.h:111
std::vector< std::vector< int > > positiveRoots
Contains all positive roots in a std::vector. Each positive root is a std::vector of integers of size...
Definition: semiSimpleAlgebra.h:559
~D()
Destructor.
Definition: semiSimpleAlgebra.h:814
Namespace of MARTY.
Definition: 2HDM.h:31
~E8()
Destructor.
Definition: semiSimpleAlgebra.h:895
Expr operator+(const Expr &a, const Expr &b)
Class inherited from std::vector<int>, dynkin labels for a state of a semi-simple algebra (see docume...
Definition: algebraState.h:35
Expr operator-(const Expr &a, const Expr &b)
std::vector< int > rho
std::vector of size l. Particular root (half-sum of simple roots) useful in calculations.
Definition: semiSimpleAlgebra.h:540
Contains a sum of Irrep (irreducible representation) of a given SemiSimpleAlgebra.
Definition: representation.h:363
Algebra (R, +) of the U(1) group.
Definition: semiSimpleAlgebra.h:629
Exceptional semi-simple Lie algebra E8.
Definition: semiSimpleAlgebra.h:883
csl::Expr symbolicRho
Symbolic version of the half-sum of simple roots (see positiveRoots). Contains the factor 1/2 that po...
Definition: semiSimpleAlgebra.h:576
Type
Different types of semi-simple Lie algebras.
Definition: semiSimpleAlgebra.h:52
~C()
Destructor.
Definition: semiSimpleAlgebra.h:785
Semi-simple Lie algebra A(l) == su(l+1).
Definition: semiSimpleAlgebra.h:709
~E7()
Destructor.
Definition: semiSimpleAlgebra.h:868
Abstract base class for all semi-simple Lie algebras.
Definition: semiSimpleAlgebra.h:96
Class AlgebraState that represents the set of dinkin labels for a state in a semi simple Lie Algebra...
std::vector< std::vector< int > > cartanMatrix
Cartan matrix of the algebra.
Definition: semiSimpleAlgebra.h:564
Exceptional semi-simple Lie algebra E7.
Definition: semiSimpleAlgebra.h:856
csl::vector_expr symbolicRoots
Symbolic version of positiveRoots, each root is a csl::Vector of csl::Integer in co-root space (dinki...
Definition: semiSimpleAlgebra.h:598
~R()
Destructor.
Definition: semiSimpleAlgebra.h:641
Expr operator*(const Expr &a, const Expr &b)
Exceptional semi-simple Lie algebra G2.
Definition: semiSimpleAlgebra.h:937
csl::Expr symbolicCartan
Symbolic version of the cartan matrix.
Definition: semiSimpleAlgebra.h:581
std::vector< int > squaredNorm
std::vector of integers of size l. Contains squared norms of all simple roots.
Definition: semiSimpleAlgebra.h:552
Definition: semiSimpleAlgebra.h:82
Exceptional semi-simple Lie algebra E6.
Definition: semiSimpleAlgebra.h:829
Exceptional semi-simple Lie algebra F4.
Definition: semiSimpleAlgebra.h:910
std::vector< std::vector< int > > rootMetric
Metric for roots in co-root space, i.e. metrix to apply in order to compute scalar dot between roots ...
Definition: semiSimpleAlgebra.h:570
Semi-simple Lie algebra B(l) == so(2l+1).
Definition: semiSimpleAlgebra.h:742
~E6()
Destructor.
Definition: semiSimpleAlgebra.h:841
Handles the irreducible representation of a given semi-simple algebra.
Definition: representation.h:42
Semi-simple Lie algebra C(l) == sp(2l).
Definition: semiSimpleAlgebra.h:771
csl::vector_expr absoluteNorms
Absolute norms of simple roots used in the computation of the quadratic Casimir operator. See SemiSimpleAlgebra::getQuadraticCasimir().
Definition: semiSimpleAlgebra.h:546
~F4()
Destructor.
Definition: semiSimpleAlgebra.h:922
std::ostream & operator<<(std::ostream &fout, mty::algebra::Type obj)
Overload of operator<< for algebra::Type. Allows to display a string corresponding to the type of alg...
csl::Expr symbolicMetric
Symbolic metric in root space. i.e. different from rootMetric that is the metric in co-root space...
Definition: semiSimpleAlgebra.h:592
Enumeration of types of semi simple Lie algebras. The names being very small, we use a namespace to a...
Definition: semiSimpleAlgebra.h:47
const int l
Order of the semi-simple algebra, i.e. number of simple roots.
Definition: semiSimpleAlgebra.h:531