Core base-b digit/weight summation shared by all van der Corput generators.
Extracts the base-b digits of n (least significant first) and accumulates each digit times its precomputed weight:
\[
\sum_k a_k(n) \cdot \mathrm{weights}[k], \qquad
n = \sum_k a_k(n) \, b^k
\]
The weights table determines the value type and scaling of the result: reverse powers \(b^{-k-1}\) for the floating-point generators, ascending integer powers for the integer generators.
- Template Parameters
-
| T | Accumulator/result type (e.g. double or unsigned long). |
| Table | Random-access table type (e.g. std::array). |
- Parameters
-
| [in] | n | The sequence index to evaluate. |
| [in] | base | The numeric base. |
| [in] | weights | Precomputed digit weights. |
- Returns
- The weighted digit sum for index
n.