Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
algebraState.h
Go to the documentation of this file.
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
22 #ifndef ALGEBRA_STATE_H_INCLUDED
23 #define ALGEBRA_STATE_H_INCLUDED
24 
25 #include <vector>
26 #include <string>
27 
28 namespace mty {
29 
35 class AlgebraState: public std::vector<int>{
36 
37  public:
38 
43  :std::vector<int>(){}
44 
49  explicit
50  AlgebraState(const std::vector<int>& vec)
51  :std::vector<int>(vec){}
52 
60  AlgebraState applyAnnihilator(const std::vector<int>& shifts) const;
61 
70  int eigenValue(const std::vector<int>& root,
71  const std::vector<int>& normRoots,
72  int normLambda) const;
73 
79  std::vector<int> getLabels() const;
80 
81  inline bool operator<(AlgebraState const &other) const {
82  return static_cast<std::vector<int>>(*this) < other;
83  }
84 
92  friend
93  std::ostream& operator<<(std::ostream& fout,
94  const AlgebraState& state);
95 };
96 
97 } // End of namespace mty
98 
99 #endif
int eigenValue(const std::vector< int > &root, const std::vector< int > &normRoots, int normLambda) const
Calculates the eigenvalue of the state with respect to the root root, considering l simple roots (the...
Definition: algebraState.cpp:42
Namespace of MARTY.
Definition: 2HDM.h:31
Class inherited from std::vector<int>, dynkin labels for a state of a semi-simple algebra (see docume...
Definition: algebraState.h:35
std::vector< int > getLabels() const
Converts the state into a simple std::vector of int corresponding to the l dinkin labels of the state...
Definition: algebraState.cpp:23
AlgebraState(const std::vector< int > &vec)
Constructor with one parameter.
Definition: algebraState.h:50
AlgebraState()
Default constructor. Initializes an empty vector of labels.
Definition: algebraState.h:42
AlgebraState applyAnnihilator(const std::vector< int > &shifts) const
Applies shifts on labels coming from annihilation operators. Creates a new state with labels "labels ...
Definition: algebraState.cpp:28
friend std::ostream & operator<<(std::ostream &fout, const AlgebraState &state)
Overload of the operator<< for AlgebraState, displays the labels in the output fout.