Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Protected Attributes | Friends
mty::SumIrrep Class Reference

Contains a sum of Irrep (irreducible representation) of a given SemiSimpleAlgebra. More...

#include <representation.h>

Inheritance diagram for mty::SumIrrep:
[legend]

Public Member Functions

 SumIrrep ()
 Default constructor. Initializes an empty SumIrrep.
 
 SumIrrep (const std::vector< Irrep > &t_irrep)
 Constructor with one parameter. More...
 
 SumIrrep (const Irrep &other)
 Constructor with one parameter. More...
 
 ~SumIrrep ()
 Destructor.
 
int getDim () const
 Calculates and returns the total dimension of the SumIrrep, i.e. the sum of the dimensions of all representations in the sum. More...
 
const SemiSimpleAlgebragetAlgebra () const
 
void insertSort (const Irrep &other)
 Inserts a new Irrep in the sum, sorting by dimension (lower dimensions first). More...
 
SumIrrep operator+ (const Irrep &other) const
 Implements the sum of the SumIrrep with an Irrep (other), stores it in a SumIrrep and returns it. More...
 
SumIrrep operator+ (const SumIrrep &other) const
 Implements the sum of the SumIrrep with a SumIrrep (other), stores it in a SumIrrep and returns it. More...
 
SumIrrep operator* (const Irrep &other) const
 Calculates and returns the product of ***this** and other in the form of a sum of irreducible representations. More...
 
SumIrrep operator* (const SumIrrep &other) const
 Calculates and returns the product of ***this** and other in the form of a sum of irreducible representations. More...
 

Protected Attributes

const SemiSimpleAlgebraalgebra
 Pointer to the algebra from which the Irreps in the sum are irreducible representations.
 

Friends

std::ostream & operator<< (std::ostream &fout, const SumIrrep &s)
 Overload of the operator<< for SumIrrep. Displays the total dimension and all dimensions of Irrep in the Sum. More...
 

Detailed Description

Contains a sum of Irrep (irreducible representation) of a given SemiSimpleAlgebra.

This class is a containor of a set of irreducible representations, Irrep objects, result of the decomposition of a tensor product of different Irrep. An example in \( SU(2)\):

\[2 \times 2 = 1 \oplus 3\]

, \(1 \oplus 3\) is a SumIrrep of size 2, containing the trivial representation of dimension 1, and the triplet. This class keeps its different Irrep sorted by increasing dimension at all time in order to respect usual conventions to display them.

Constructor & Destructor Documentation

◆ SumIrrep() [1/2]

mty::SumIrrep::SumIrrep ( const std::vector< Irrep > &  t_irrep)
explicit

Constructor with one parameter.

Parameters
t_irrepstd::vector of Irrep in the sum.

◆ SumIrrep() [2/2]

mty::SumIrrep::SumIrrep ( const Irrep other)
explicit

Constructor with one parameter.

Parameters
otherFirst (and unique for now) representation in the sum.

Member Function Documentation

◆ getAlgebra()

const SemiSimpleAlgebra * mty::SumIrrep::getAlgebra ( ) const
Returns
A pointer to the (const) SemiSimpleAlgebra of which the Irreps are representations.

◆ getDim()

int mty::SumIrrep::getDim ( ) const

Calculates and returns the total dimension of the SumIrrep, i.e. the sum of the dimensions of all representations in the sum.

For example, the dimension of \( 1\oplus 8\oplus8 \oplus 10 \) is 27.

Returns
The dimension of the SumIrrep.

◆ insertSort()

void mty::SumIrrep::insertSort ( const Irrep other)

Inserts a new Irrep in the sum, sorting by dimension (lower dimensions first).

Parameters
otherIrrep to insert.

◆ operator*() [1/2]

SumIrrep mty::SumIrrep::operator* ( const Irrep other) const

Calculates and returns the product of ***this** and other in the form of a sum of irreducible representations.

The product is exanded the same way as Irrep::operator*(SumIrrep const& other) to yield a direct sum of Irrep, stored in a new SumIrrep that is returned.

Parameters
otherRight operand in the product of representation.
Returns
The product decomposed in sum of Irrep.

◆ operator*() [2/2]

SumIrrep mty::SumIrrep::operator* ( const SumIrrep other) const

Calculates and returns the product of ***this** and other in the form of a sum of irreducible representations.

The product is exanded the same way as Irrep::operator*(SumIrrep const& other) to yield a direct sum of Irrep, stored in a new SumIrrep that is returned. For example,

\[ (2\oplus 2) \times (1\oplus 3) = (2\times 1)\oplus (2\times 3)\oplus (2\times 1) \oplus (2\times 3) = 1\oplus 1\oplus 2\oplus 2\oplus 4\oplus 4.\]

Parameters
otherRight operand in the product of representation.
Returns
The product decomposed in sum of Irrep.

◆ operator+() [1/2]

SumIrrep mty::SumIrrep::operator+ ( const Irrep other) const

Implements the sum of the SumIrrep with an Irrep (other), stores it in a SumIrrep and returns it.

A SumIrrep similar to *this is created, and other is inserted in it, calling SumIrrep::insertSort().

Parameters
otherSecond operand in the sum.
Returns
The SumIrrep of ***this** and other.

◆ operator+() [2/2]

SumIrrep mty::SumIrrep::operator+ ( const SumIrrep other) const

Implements the sum of the SumIrrep with a SumIrrep (other), stores it in a SumIrrep and returns it.

The two lists of Irrep objects are simply merged in a new SumIrrep and sorted. The total dimension of the result is the sum of the two operands' dimensions.

Parameters
otherSecond operand in the sum.
Returns
The SumIrrep of ***this** and other.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  fout,
const SumIrrep s 
)
friend

Overload of the operator<< for SumIrrep. Displays the total dimension and all dimensions of Irrep in the Sum.

Parameters
foutOutput flux.
irrepSumIrrep to display.
Returns
The modified flux.

The documentation for this class was generated from the following files: