SOLIDstate
A C++ library for solid state physics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
HilbertSpace.hpp
Go to the documentation of this file.
1 
11 #ifndef HILBERTSPACE_HILBERTSPACE_HPP
12 #define HILBERTSPACE_HILBERTSPACE_HPP
13 
14 #include "../Ensemble/Ensemble.hpp"
15 #include "../Combinadics/Combinadics.hpp"
16 namespace solid
17 {
18 
19 // main purpose: state enumeration within the sectors
20 // class contains
21 // - Base State
22 // - Ensemble
23 
32 {
33 public:
42 
48  void InitialBaseState();
49 
56  bool NextBaseState();
57 
66  void Reset();
67 
72 
79  bool operator++(int);
80 
88 
96 
97 
98 private:
100  int sectorIndex = 0;
103 
110  bool NextSector();
111 
118  bool LastSector();
119 
126 };
127 
128 } // namespace solid
129 
130 #endif
bool NextSector()
distance between current sector and the next sector with the same parity
Definition: HilbertSpace.cpp:82
statenumber GetStateIndexInNextParitySector(BaseState state)
Get the State Index In Next Parity Sector object.
Definition: HilbertSpace.cpp:77
void Reset()
sets stateTotalIndex and all private Indexes to 0
Definition: HilbertSpace.cpp:16
statenumber stateIndex
Definition: HilbertSpace.hpp:99
statenumber sectorOffset
current selected sector – enumerates the sectors //TODO make iterator or pointer instead of indexing ...
Definition: HilbertSpace.hpp:101
Ensemble parent class.
Definition: Ensemble.hpp:55
void InitialBaseState()
BaseState initialization.
Definition: HilbertSpace.cpp:25
statenumber GetStateIndexInCurrentSector(BaseState state)
Get the State Index In Current Sector object.
Definition: HilbertSpace.cpp:50
statenumber nextParitySectorOffset
ancillary variable for inserting inter-sector interaction elements
Definition: HilbertSpace.hpp:102
statenumber stateTotalIndex
enumerates the states inside the ensemble (all sectors)
Definition: HilbertSpace.hpp:71
void GetNextParitySectorOffset()
Get the Next Parity Sector Offset object.
Definition: HilbertSpace.cpp:55
BaseState baseState
current BaseState in HilbertSpace
Definition: HilbertSpace.hpp:37
bool LastSector()
checks if current selected sector from Ensemble is the last one
Definition: HilbertSpace.cpp:100
int sectorIndex
current selcted BaseState enumerates the states inside the sector
Definition: HilbertSpace.hpp:100
Ensemble ensemble
selected Ensemble
Definition: HilbertSpace.hpp:41
BaseState for HilbertSpace base.
Definition: BaseState.hpp:29
long int statenumber
Hilbert space can be huge...
Definition: BaseState.hpp:21
bool operator++(int)
overloaded ++ operator, which execute NextBaseState()
Definition: HilbertSpace.cpp:45
bool NextBaseState()
picks up the next BaseState from Ensemble
Definition: HilbertSpace.cpp:33
Hilbert Space class for state enumeration within the Sectors (Sector)
Definition: HilbertSpace.hpp:31