SyTen
syten::Basis Class Reference

Basis on a specific tensor leg, essentially a list of symmetry sectors and associated reduced tensor sizes More...

#include <basis.h>

+ Inheritance diagram for syten::Basis:
+ Collaboration diagram for syten::Basis:

Public Types

typedef std::vector< std::pair< Index, Sector > > BaseType
 Type used to store the sector data. More...
 

Public Member Functions

Basis a () const
 Shortcut for adjointed() More...
 
void add (Index size, std::initializer_list< Rep > const &repsIL, bool drop_repeated=true)
 Overload of add() to work with initializer_list<Rep> More...
 
template<typename Type >
void add (Index size, Type &&reps, bool drop_repeated=true)
 Adds an element to the basis. More...
 
void adjoint ()
 Adjoints this basis, replaces each irrep by its adjoint: { Inc, [U1[2], U1[-1]] } → { Inc, [U1[-2], U1[1]] }. More...
 
Basis adjointed () const
 Returns a copy of this basis adjointed. More...
 
 Basis ()=default
 Default ctor for archiving. More...
 
 Basis (Direction dir_)
 Empty basis with specified direction. More...
 
 Basis (Direction dir_, Index size, Sector const &reps)
 Creates a basis with one sector. More...
 
 Basis (Direction dir_, Index size, std::vector< Rep > const &reps, bool)
 Creates a basis with reps.size() sectors. More...
 
 Basis (Direction dir_, Index size, std::vector< Sector > const &reps)
 Creates a basis with reps.size() sectors. More...
 
 Basis (Direction dir_, std::vector< Index > const &sizes, std::vector< Rep > const &reps)
 Creates a basis with reps.size() sectors. More...
 
 Basis (Direction dir_, std::vector< Index > const &sizes, std::vector< Sector > const &reps)
 Creates a basis with reps.size() sectors. More...
 
bool compatible (Basis const &other) const
 True iff all basis elements that are both in *this and in other have the same size in both. More...
 
Index elementSize (Sector const &sym) const
 Returns the element size of the specified sector or 0 if it doesn't exist. More...
 
Basis f () const
 Shortcut for flipped() More...
 
Basis fa () const
 Shortcut for flippedAdjointed More...
 
void flip ()
 Flips this basis, direction going the other way: { Inc, [U1[2], U1[-1]] } → { Out, [U1[2], U1[-1]] }. More...
 
void flipAdjoint ()
 Flips and adjoints this basis, direction going the other way and each irrep replaced by its adjoint: { Inc, [U1[2], U1[-1]] } → { Out, [U1[-2], U1[1]] }. More...
 
Basis flipped () const
 Returns a copy of this basis flipped. More...
 
Basis flippedAdjointed () const
 Returns a copy of this basis both flipped and adjointed. More...
 
bool hasSymmetry (Sector const &sym) const
 Returns true if this basis contains the specified sector. More...
 
bool isVacuum () const
 Returns true if this basis is a vacuum basis (single element, all 0 labels) More...
 
template<typename Archive >
void load (Archive &ar, const unsigned int in_version)
 Boost archiving. More...
 
bool operator!= (Basis const &other) const
 True if at least one basis element is not identical or does not occur in other (or vice versa) More...
 
bool operator== (Basis const &other) const
 True iff all basis elements are identical. More...
 
template<typename Archive >
void save (Archive &ar, const unsigned int) const
 Boost archiving. More...
 
Basis silenced () const
 Silences the direction of the basis. More...
 
Index size () const
 Returns the size of the basis as an Index. More...
 
- Public Member Functions inherited from std::vector< std::pair< Index, Sector > >
std::pair< Index, Sector > assign (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > at (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > back (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > begin (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > capacity (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > cbegin (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > cend (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > clear (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > crbegin (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > crend (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > data (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > emplace (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > emplace_back (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > empty (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > end (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > erase (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > front (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > get_allocator (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > insert (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > max_size (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > operator= (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > operator[] (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > pop_back (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > push_back (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > rbegin (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > rend (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > reserve (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > resize (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > shrink_to_fit (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > size (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > swap (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > vector (std::pair< Index, Sector > ... args)
 
std::pair< Index, Sector > ~vector (std::pair< Index, Sector > ... args)
 

Public Attributes

Direction dir = Direction::Invalid
 Direction of the basis in relation to its tensor; the basis from an incoming leg of a tensor has Direction::Inc. More...
 
Index numSymmetries = 0
 Number of symmetries per sector. More...
 
- Public Attributes inherited from std::vector< std::pair< Index, Sector > >
std::pair< Index, Sector > elements
 STL member. More...
 

Static Public Attributes

static constexpr unsigned int version = 1
 Boost serialisation version. More...
 

Detailed Description

Basis on a specific tensor leg, essentially a list of symmetry sectors and associated reduced tensor sizes


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