Explicit sparse tensor space represented as quantum numbers with one shared symmetry.
More...
#include <qnum.hpp>
|
| auto | begin () const |
| | Return an iterator to the first element.
|
| |
| void | clear () |
| | Remove all quantum numbers while keeping the list symmetry.
|
| |
| auto | contains (QNum q) const -> bool |
| | Return whether the list already contains the given quantum number.
|
| |
| auto | empty () const -> bool |
| | Return whether the list is empty.
|
| |
| auto | end () const |
| | Return an iterator past the last element.
|
| |
| void | normalize () |
| | Sort entries and remove duplicates.
|
| |
| auto | operator== (QNumList const &other) const -> bool=default |
| | Compare two sparse irrep lists for exact equality.
|
| |
| auto | operator[] (std::size_t index) const -> QNum const & |
| | Return indexed element access.
|
| |
| void | push_back (QNum q) |
| | Append a quantum number with the matching symmetry.
|
| |
| | QNumList (Symmetry sym) |
| | Construct an empty list tied to one symmetry.
|
| |
| | QNumList (Symmetry sym, std::initializer_list< QNum > values) |
| | Construct a list from initial values.
|
| |
| auto | size () const -> std::size_t |
| | Return the number of stored quantum numbers.
|
| |
| void | sort () |
| | Sort entries by canonical packed order.
|
| |
| auto | symmetry () const -> Symmetry |
| | Return the symmetry shared by all entries.
|
| |
Explicit sparse tensor space represented as quantum numbers with one shared symmetry.
QNumList keeps ordering and repeated labels explicit. See docs/symmetry/qnum.md.
◆ QNumList() [1/2]
| uni20::QNumList::QNumList |
( |
Symmetry |
sym | ) |
|
|
inlineexplicit |
Construct an empty list tied to one symmetry.
- Parameters
-
| sym | Symmetry carried by every element of the list. |
◆ QNumList() [2/2]
| uni20::QNumList::QNumList |
( |
Symmetry |
sym, |
|
|
std::initializer_list< QNum > |
values |
|
) |
| |
|
inline |
Construct a list from initial values.
- Parameters
-
| sym | Symmetry carried by every element. |
| values | Initial list contents. |
◆ begin()
| auto uni20::QNumList::begin |
( |
| ) |
const |
|
inline |
Return an iterator to the first element.
- Returns
- Begin iterator.
◆ clear()
| void uni20::QNumList::clear |
( |
| ) |
|
|
inline |
Remove all quantum numbers while keeping the list symmetry.
◆ contains()
| auto uni20::QNumList::contains |
( |
QNum |
q | ) |
const -> bool
|
|
inline |
Return whether the list already contains the given quantum number.
- Parameters
-
| q | Quantum number to search for. |
- Returns
true if the quantum number is present.
◆ empty()
| auto uni20::QNumList::empty |
( |
| ) |
const -> bool |
|
inline |
Return whether the list is empty.
- Returns
true if the list contains no entries.
◆ end()
| auto uni20::QNumList::end |
( |
| ) |
const |
|
inline |
Return an iterator past the last element.
- Returns
- End iterator.
◆ normalize()
| void uni20::QNumList::normalize |
( |
| ) |
|
|
inline |
Sort entries and remove duplicates.
◆ operator==()
| auto uni20::QNumList::operator== |
( |
QNumList const & |
other | ) |
const -> bool=default |
|
default |
Compare two sparse irrep lists for exact equality.
- Parameters
-
| other | Other sparse irrep list. |
- Returns
true if symmetry and ordered values match.
◆ operator[]()
| auto uni20::QNumList::operator[] |
( |
std::size_t |
index | ) |
const -> QNum const& |
|
inline |
Return indexed element access.
- Parameters
-
- Returns
- Quantum number at the requested position.
◆ push_back()
| void uni20::QNumList::push_back |
( |
QNum |
q | ) |
|
|
inline |
Append a quantum number with the matching symmetry.
- Parameters
-
| q | Quantum number to append. |
◆ size()
| auto uni20::QNumList::size |
( |
| ) |
const -> std::size_t |
|
inline |
Return the number of stored quantum numbers.
- Returns
- Element count.
◆ sort()
| void uni20::QNumList::sort |
( |
| ) |
|
|
inline |
Sort entries by canonical packed order.
◆ symmetry()
| auto uni20::QNumList::symmetry |
( |
| ) |
const -> Symmetry |
|
inline |
Return the symmetry shared by all entries.
- Returns
- List symmetry.
The documentation for this class was generated from the following file: