VMPS++
Loading...
Searching...
No Matches
qarray< Nq > Struct Template Reference

Detailed Description

template<size_t Nq>
struct qarray< Nq >

Array of quantum numbers corresponding to Abelian or non Abelian symmetries. Just a thin wrapper over std::array<int,Nq> with some bracket operators, boolean functions, coefficient-wise arithmetics and output to with a streaming operator.

Template Parameters
Nq
amount of conserved quantum numbers:
- Nq=1: Heisenberg ( $2M$)
- Nq=2: Hubbard ( $N_{\uparrow}$, $N_{\downarrow}$),
Kondo ( $M_{tot}=2M_{s}+N_{\uparrow}-N_{\downarrow}$, $N=N_{\uparrow}+N_{\downarrow}$ )
Note
special typedefs not caught by Doxygen:
qarray2<Nq> = std::array<qarray<Nq>,2> : pair of quantum numbers in a two-legged tensor Biped
qarray3<Nq> = std::array<qarray<Nq>,3> : triplet of quantum numbers in a three-legged tensor Tripod (see Multipede)
qarray4<Nq> = std::array<qarray<Nq>,4> : quadruplet of quantum numbers in a four-legged tensor Quadruped (see Multipede)

Definition at line 25 of file qarray.h.

#include <qarray.h>

Public Member Functions

constexpr qarray ()
 
constexpr qarray (const std::array< int, Nq > &in)
 
 qarray (std::initializer_list< int > a)
 
int & operator[] (size_t i)
 
int & operator() (size_t i)
 
const int & operator[] (size_t i) const
 
const int & operator() (size_t i) const
 
int distance (const qarray< Nq > &other)
 

Public Attributes

std::array< int, Nq > data
 

Constructor & Destructor Documentation

◆ qarray() [1/3]

template<size_t Nq>
constexpr qarray< Nq >::qarray ( )
inlineconstexpr

Constructs with zeros.

Definition at line 28 of file qarray.h.

◆ qarray() [2/3]

template<size_t Nq>
constexpr qarray< Nq >::qarray ( const std::array< int, Nq > &  in)
inlineconstexpr

Constructs with an input array.

Definition at line 31 of file qarray.h.

◆ qarray() [3/3]

template<size_t Nq>
qarray< Nq >::qarray ( std::initializer_list< int >  a)
inline

Constructs with an initializer_list.

Definition at line 34 of file qarray.h.

Member Function Documentation

◆ distance()

template<size_t Nq>
int qarray< Nq >::distance ( const qarray< Nq > &  other)
inline

Definition at line 43 of file qarray.h.

◆ operator()() [1/2]

template<size_t Nq>
int & qarray< Nq >::operator() ( size_t  i)
inline

Definition at line 39 of file qarray.h.

◆ operator()() [2/2]

template<size_t Nq>
const int & qarray< Nq >::operator() ( size_t  i) const
inline

Definition at line 41 of file qarray.h.

◆ operator[]() [1/2]

template<size_t Nq>
int & qarray< Nq >::operator[] ( size_t  i)
inline

Definition at line 38 of file qarray.h.

◆ operator[]() [2/2]

template<size_t Nq>
const int & qarray< Nq >::operator[] ( size_t  i) const
inline

Definition at line 40 of file qarray.h.

Member Data Documentation

◆ data

template<size_t Nq>
std::array<int,Nq> qarray< Nq >::data

Definition at line 36 of file qarray.h.


The documentation for this struct was generated from the following file: