The few-body solver (src/few) reuses the ideas of the two-body one and almost none of its code, because the
natural objects are different: matrices of Gaussian exponents instead of single widths.
jacobi): from masses, an ordering and a tree shape, build the linear map to Jacobi vectors.
Test: the kinetic energy comes out diagonal.cg): everything an operator needs is computed once per pair of Gaussians.--8<-- "src/few/cg.cpp:kernel"
Then any pair potential is (\langle f\rangle_c) with c_of(w). Fixed-capacity Eigen matrices (at most 4×4) keep
the inner loop free of heap allocations.
colourspin): explicit vectors and Kronecker products. Slower than hand-derived tables,
immune to their sign errors. Sum rules check them.system): generate channel functions and random functions with a fixed seed; build the
antisymmetriser over the group of identical particles and apply it to the ket only; drop functions it
annihilates; assemble one-dimensional radial averages × spin–colour matrix elements; solve with the same
canonical orthogonalisation.standard): which channels belong to which particle content, in one place, used by the
command line, the API and every binding.(\langle e^{-\mu r}\rangle_c) has a closed form with two terms that cancel for large (\mu/\sqrt c). The code switches to the stable moment recursion of chapter 1 there.
Matrices are dense. Size grows as (ranges per coordinate)(^{N-1}) × channels × spin–colour states, the
eigensolver as its cube. max_dim refuses requests that would not finish, and the tests with hundreds of correlated
Gaussians are labelled heavy and skipped under the sanitizers.
Harmonic forces with unequal masses (exact), the positronium ion and molecule (known to many digits), (N=2) against the GEM solver, separated clusters giving the threshold, the Pauli principle, published AL1 mesons, and complex scaling on problems where it must do nothing to bound states.