Handles the full symmetry properties of an TensorElement, i.e. a vector of Permutation objects, each giving a permutation of the indices and the sign of the permutation (if the permutation is symmetric or anti-symmetric).
More...
#include <symmetry.h>
|
|
| Symmetry () |
| | Default constructor.
|
| |
|
| Symmetry (int t_dim) |
| | Initializes the symmetry in a given dimension.
|
| |
| | Symmetry (const Symmetry &t_symmetry)=default |
| | Copy constructor. More...
|
| |
|
| ~Symmetry () |
| | Destructor.
|
| |
| int | getDim () const |
| | The dimension of the symmetry is the number of indices on which it is applied, and then also the Permutation::size of the Permutation objects it encapsulates. More...
|
| |
| size_t | getNPermutation () const |
| |
| std::vector< Permutation > | getPermutation () const |
| |
|
int | getSymmetryOf (int i, int j) const |
| |
| void | addSymmetry (const Permutation &newPermutation, int sym=1) |
| | Adds a new symmetry in the form of a Permutation. The user must give the Permutation and the symmetry factor associated (1 if the Permutation is a symmetry, -1 if it is an anti-symmetry). More...
|
| |
| void | addSymmetry (const std::vector< int > &newPermutation, int sym=1) |
| | Adds a new symmetry in the form of a Permutation. The user must give the Permutation and the symmetry factor associated (1 if the Permutation is a symmetry, -1 if it is an anti-symmetry). More...
|
| |
| void | addSymmetry (const std::vector< std::vector< int >> &newPermutation, int sym=1) |
| | Adds a new symmetry in the form of a Permutation. The user must give the Permutation and the symmetry factor associated (1 if the Permutation is a symmetry, -1 if it is an anti-symmetry). More...
|
| |
|
void | adjustPermutationSize () |
| |
|
void | setMustGetSpan (bool t_must) |
| |
| bool | operator== (const Symmetry &symmetry) const |
| | operator==, compares two Symmetry objects. More...
|
| |
| bool | operator!= (const Symmetry &symmetry) const |
| | operator!=, compares two Symmetry objects. More...
|
| |
|
Symmetry | operator* (const Symmetry &other) const |
| |
Handles the full symmetry properties of an TensorElement, i.e. a vector of Permutation objects, each giving a permutation of the indices and the sign of the permutation (if the permutation is symmetric or anti-symmetric).
◆ Symmetry()
| csl::Symmetry::Symmetry |
( |
const Symmetry & |
t_symmetry | ) |
|
|
default |
Copy constructor.
- Parameters
-
◆ addSymmetry() [1/3]
| void csl::Symmetry::addSymmetry |
( |
const Permutation & |
newPermutation, |
|
|
int |
sym = 1 |
|
) |
| |
Adds a new symmetry in the form of a Permutation. The user must give the Permutation and the symmetry factor associated (1 if the Permutation is a symmetry, -1 if it is an anti-symmetry).
- Parameters
-
◆ addSymmetry() [2/3]
| void csl::Symmetry::addSymmetry |
( |
const std::vector< int > & |
newPermutation, |
|
|
int |
sym = 1 |
|
) |
| |
Adds a new symmetry in the form of a Permutation. The user must give the Permutation and the symmetry factor associated (1 if the Permutation is a symmetry, -1 if it is an anti-symmetry).
- Warning
- This function may be used only if the symmetry has already a defined dimension.
- Parameters
-
◆ addSymmetry() [3/3]
| void csl::Symmetry::addSymmetry |
( |
const std::vector< std::vector< int >> & |
newPermutation, |
|
|
int |
sym = 1 |
|
) |
| |
Adds a new symmetry in the form of a Permutation. The user must give the Permutation and the symmetry factor associated (1 if the Permutation is a symmetry, -1 if it is an anti-symmetry).
- Warning
- This function may be used only if the symmetry has already a defined dimension.
- Parameters
-
◆ getDim()
| int csl::Symmetry::getDim |
( |
| ) |
const |
The dimension of the symmetry is the number of indices on which it is applied, and then also the Permutation::size of the Permutation objects it encapsulates.
- Returns
- The dimension of the Symmetry object.
◆ getNPermutation()
| size_t csl::Symmetry::getNPermutation |
( |
| ) |
const |
◆ getPermutation()
| vector< Permutation > csl::Symmetry::getPermutation |
( |
| ) |
const |
◆ operator!=()
| bool csl::Symmetry::operator!= |
( |
const Symmetry & |
symmetry | ) |
const |
operator!=, compares two Symmetry objects.
- Parameters
-
- Returns
- False if the two symmetries are the same.
-
True else.
◆ operator==()
| bool csl::Symmetry::operator== |
( |
const Symmetry & |
symmetry | ) |
const |
operator==, compares two Symmetry objects.
- Parameters
-
- Returns
- True if the two symmetries are the same.
-
False else.
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
fout, |
|
|
const Symmetry & |
symmetry |
|
) |
| |
|
friend |
operator<<, displays the Symmetry symmetry in the output fout.
- Parameters
-
| fout | Output flux. |
| permutation | Symmetry to diplay. |
- Returns
- A reference to the modified flux fout.
The documentation for this class was generated from the following files: