ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
|
Look-up table for matrix elements. Note: does not assume any symmetry: (a,b) is stored independantly of (b,a). In general, maps a pair of DiracSpinors to a single value (of any type, T). More...
#include <meTable.hpp>
Public Member Functions | |
auto | operator-> () |
void | add (const DiracSpinor &a, const DiracSpinor &b, T value) |
Adds new element to table. If already exists, does nothing (does not update) | |
void | add (DiracSpinor::Index a, DiracSpinor::Index b, T value) |
Adds new element to table. If already exists, does nothing (does not update) | |
void | add (const meTable< T > &other) |
Adds elements from one Table into another (by copy) | |
void | update (const DiracSpinor &a, const DiracSpinor &b, T value) |
Updates given element in table. If element not yet present, adds it. | |
void | update (DiracSpinor::Index a, DiracSpinor::Index b, T value) |
Updates given element in table. If element not yet present, adds it. | |
bool | contains (const DiracSpinor &a, const DiracSpinor &b) const |
Checks if given element is in the table. | |
bool | contains (DiracSpinor::Index a, DiracSpinor::Index b) const |
Checks if given element is in the table. | |
const T * | get (const DiracSpinor &a, const DiracSpinor &b) const |
Gets pointer to const requested element. If element not present, returns nullptr. | |
const T * | get (DiracSpinor::Index a, DiracSpinor::Index b) const |
Gets pointer to const requested element. If element not present, returns nullptr. | |
T * | get (const DiracSpinor &a, const DiracSpinor &b) |
Gets pointer to mutable requested element. If element not present, returns nullptr. | |
T * | get (DiracSpinor::Index a, DiracSpinor::Index b) |
Gets pointer to mutable requested element. If element not present, returns nullptr. | |
T | getv (const DiracSpinor &a, const DiracSpinor &b) const |
Gets value of requested element. If element not present, returns zero (or default constructed T) | |
T | getv (DiracSpinor::Index a, DiracSpinor::Index b) const |
Gets value of requested element. If element not present, returns zero (or default constructed T) | |
const T * | get (const std::string &a, const std::string &b) const |
Gets pointer to const requested element. If element not present, returns nullptr. Overload for strings (parses symbol) | |
auto | begin () |
Provide iterators. | |
auto | end () |
auto | cbegin () const |
auto | cend () const |
Static Public Member Functions | |
static std::pair< std::string, std::string > | index_to_symbols (nk2Index index) |
static nk2Index | FormIndex (nkIndex a, nkIndex b) |
static std::pair< nkIndex, nkIndex > | unFormIndex (nk2Index index) |
Look-up table for matrix elements. Note: does not assume any symmetry: (a,b) is stored independantly of (b,a). In general, maps a pair of DiracSpinors to a single value (of any type, T).