Xped
Loading...
Searching...
No Matches
Xped::qarray< Nq > Struct Template Reference

#include <qarray.hpp>

Public Member Functions

constexpr qarray ()
 
constexpr qarray (const std::array< int, Nq > &in)
 
 qarray (const std::vector< int > &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)
 
template<typename Ar >
void serialize (Ar &ar)
 

Public Attributes

std::array< int, Nq > data
 

Friends

std::size_t hash_value (const qarray< Nq > &qin)
 

Detailed Description

template<size_t Nq>
struct Xped::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. \describe_Nq

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)

Constructor & Destructor Documentation

◆ qarray() [1/4]

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

Constructs with zeros.

◆ qarray() [2/4]

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

Constructs with an input array.

◆ qarray() [3/4]

template<size_t Nq>
Xped::qarray< Nq >::qarray ( const std::vector< int > &  in)
inline

◆ qarray() [4/4]

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

Constructs with an initializer_list.

Member Function Documentation

◆ distance()

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

◆ operator()() [1/2]

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

◆ operator()() [2/2]

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

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ serialize()

template<size_t Nq>
template<typename Ar >
void Xped::qarray< Nq >::serialize ( Ar &  ar)
inline

Friends And Related Function Documentation

◆ hash_value

template<size_t Nq>
std::size_t hash_value ( const qarray< Nq > &  qin)
friend

Member Data Documentation

◆ data

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

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