Lookup table for Wigner 6j symbols.
Pre-computes and caches Wigner 6j symbols \(\sixj{a/2}{b/2}{c/2}{d/2}{e/2}{f/2}\). All public functions accept arguments as \(2j\) or \(2k\) (integers), so that half-integer spins are handled exactly.
Storage exploits symmetry: the six entries of each symbol are permuted into a canonical "normal order" before lookup, so each physically distinct symbol is stored only once.
- Note
- Call fill() (or the constructor) with the maximum \(2j\) or \(k\) that will be needed; the table can be extended at any time.
- Requesting a symbol outside the stored range returns 0 without warning.
- Non-mutable accessors are thread-safe once the table is fully built.
- Warning
- Symbols are stored up to the value passed to fill(); calls with larger arguments silently return 0.
|
| | SixJTable ()=default |
| | Constructs an empty table; extend later with fill() or get().
|
| |
| | SixJTable (int max_2j_k) |
| | Constructs the table, pre-filling all symbols up to max_2j_k.
|
| |
| int | max_2jk () const |
| | Returns the maximum 2j (or k) currently stored; max(k) = 2*max(j).
|
| |
| std::size_t | size () const |
| | Returns the number of non-zero symbols stored in the table.
|
| |
| double | get_2 (int a, int b, int c, int d, int e, int f) const |
| | Returns 6j symbol {a/2, b/2, c/2; d/2, e/2, f/2}.
|
| |
| template<class A , class B , class C , class D , class E , class F > |
| double | get (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f) const |
| | "Magic" table lookup: pass integers (for k) or DiracSpinors (for j).
|
| |
| bool | contains (int a, int b, int c, int d, int e, int f) const |
| | Returns true if the symbol is present in the table (absent symbols may be zero or simply out of range).
|
| |
| void | fill (int max_2j_k) |
| | Extends the table to cover all symbols up to max_2j_k.
|
| |
template<class A , class B , class C , class D , class E , class F >
| double Angular::SixJTable::get |
( |
const A & |
a, |
|
|
const B & |
b, |
|
|
const C & |
c, |
|
|
const D & |
d, |
|
|
const E & |
e, |
|
|
const F & |
f |
|
) |
| const |
|
inline |
"Magic" table lookup: pass integers (for k) or DiracSpinors (for j).
Converts each argument via twojk() then delegates to get_2(). Example: get(Fa, Fb, k, Fc, Fd, k) returns \(\{j_a,j_b,k;j_c,j_d,k\}\). Returns 0 without warning if the symbol is outside the stored range.
- Warning
- Do not pre-multiply by 2.