ampsci
High-precision calculations for one- and two-valence atomic systems
Coulomb::meTable< T >

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.
 
getv (const DiracSpinor &a, const DiracSpinor &b) const
 Gets value of requested element. If element not present, returns zero (or default constructed 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, nkIndexunFormIndex (nk2Index index)
 

Detailed Description

template<typename T = double>
class Coulomb::meTable< T >

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).

Member Function Documentation

◆ add() [1/3]

template<typename T = double>
void Coulomb::meTable< T >::add ( const DiracSpinor a,
const DiracSpinor b,
value 
)
inline

Adds new element to table. If already exists, does nothing (does not update)

◆ add() [2/3]

template<typename T = double>
void Coulomb::meTable< T >::add ( DiracSpinor::Index  a,
DiracSpinor::Index  b,
value 
)
inline

Adds new element to table. If already exists, does nothing (does not update)

◆ add() [3/3]

template<typename T = double>
void Coulomb::meTable< T >::add ( const meTable< T > &  other)
inline

Adds elements from one Table into another (by copy)

◆ update() [1/2]

template<typename T = double>
void Coulomb::meTable< T >::update ( const DiracSpinor a,
const DiracSpinor b,
value 
)
inline

Updates given element in table. If element not yet present, adds it.

◆ update() [2/2]

template<typename T = double>
void Coulomb::meTable< T >::update ( DiracSpinor::Index  a,
DiracSpinor::Index  b,
value 
)
inline

Updates given element in table. If element not yet present, adds it.

◆ contains() [1/2]

template<typename T = double>
bool Coulomb::meTable< T >::contains ( const DiracSpinor a,
const DiracSpinor b 
) const
inline

Checks if given element is in the table.

◆ contains() [2/2]

template<typename T = double>
bool Coulomb::meTable< T >::contains ( DiracSpinor::Index  a,
DiracSpinor::Index  b 
) const
inline

Checks if given element is in the table.

◆ get() [1/5]

template<typename T = double>
const T * Coulomb::meTable< T >::get ( const DiracSpinor a,
const DiracSpinor b 
) const
inline

Gets pointer to const requested element. If element not present, returns nullptr.

◆ get() [2/5]

template<typename T = double>
const T * Coulomb::meTable< T >::get ( DiracSpinor::Index  a,
DiracSpinor::Index  b 
) const
inline

Gets pointer to const requested element. If element not present, returns nullptr.

◆ get() [3/5]

template<typename T = double>
T * Coulomb::meTable< T >::get ( const DiracSpinor a,
const DiracSpinor b 
)
inline

Gets pointer to mutable requested element. If element not present, returns nullptr.

◆ get() [4/5]

template<typename T = double>
T * Coulomb::meTable< T >::get ( DiracSpinor::Index  a,
DiracSpinor::Index  b 
)
inline

Gets pointer to mutable requested element. If element not present, returns nullptr.

◆ getv() [1/2]

template<typename T = double>
T Coulomb::meTable< T >::getv ( const DiracSpinor a,
const DiracSpinor b 
) const
inline

Gets value of requested element. If element not present, returns zero (or default constructed T)

◆ getv() [2/2]

template<typename T = double>
T Coulomb::meTable< T >::getv ( DiracSpinor::Index  a,
DiracSpinor::Index  b 
) const
inline

Gets value of requested element. If element not present, returns zero (or default constructed T)

◆ get() [5/5]

template<typename T = double>
const T * Coulomb::meTable< T >::get ( const std::string &  a,
const std::string &  b 
) const
inline

Gets pointer to const requested element. If element not present, returns nullptr. Overload for strings (parses symbol)

◆ begin()

template<typename T = double>
auto Coulomb::meTable< T >::begin ( )
inline

Provide iterators.


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