|
TBTK
|
#include <Index.h>
Public Member Functions | |
| Index (std::initializer_list< int > i) | |
| Index (std::vector< int > i) | |
| Index (const Index &index) | |
| Index (const Index &head, const Index &tail) | |
| bool | equals (const Index &index, bool allowWildcard=false) const |
| int & | at (unsigned int n) |
| const int & | at (unsigned int n) const |
| unsigned int | size () const |
| void | push_back (int subindex) |
| int | popFront () |
| int | popBack () |
| Index | getUnitRange () |
| Index | getSubIndex (int first, int last) |
| void | print () const |
| std::string | toString () const |
Friends | |
| bool | operator< (const Index &i1, const Index &i2) |
| bool | operator> (const Index &i1, const Index &i2) |
Flexible physical index for indexing arbitrary models. Each index can contain an arbitrary number of subindices. For example {x, y, spin}, {x, y, z, orbital, spin}, and {subsystem, x, y, z, orbital, spin}.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Copy constructor.
Constructor. Concatenates two indices into one total index of the form {head, tail}.
|
inline |
Get subindex n.
|
inline |
Get subindex n. Constant version.
|
inline |
Compare this index with another index. Returns true if the indices have the same number of subindices and all subindices are equal.
| index | Index to compare with. |
| allowWildcard | IDX_ALL is interpreted as wildcard. |
| Index TBTK::Index::getSubIndex | ( | int | first, |
| int | last | ||
| ) |
Returns an Index containing the subindices from position 'first' to 'last'.
| Index TBTK::Index::getUnitRange | ( | ) |
Returns an index with the same number or subindices, and each subindex set to 1.
|
inline |
Removes and returns the last subindex.
|
inline |
Removes and returns the first subindex.
|
inline |
Print index. Mainly for debuging.
|
inline |
Push subindex at the back of the index.
|
inline |
Get size.
|
inline |
Print index. Mainly for debuging.
Comparison operator. Returns false if the TreeNode structure would generate a smaller Hilbert space index for i1 than for i2.
Comparison operator. Returns false if the TreeNode structure would generate a larger Hilbert space index for i1 than for i2.
1.8.11