34 std::array<unsigned long, MAX_REVERSE_BITS>
37 "MAX_REVERSE_BITS must be at least the number of bits in unsigned long");
48 unsigned long factor = 1;
50 for (
unsigned int i = 0; i < n; ++i) {
51 factor_lst[n - 1 - i] = factor;
68 [[nodiscard]]
auto value_at(
unsigned long n)
const ->
unsigned long {
69 return ldsgen::detail::vdc_digit_sum<unsigned long>(n, this->_base, this->factor_lst);
98 explicit Halton(
const std::array<unsigned long, 2>& base,
99 const std::array<unsigned int, 2>& scale)
100 : vdc0(base[0], scale[0]), vdc1(base[1], scale[1]) {}
112 [[nodiscard]]
auto value_at(
unsigned long n)
const -> array<unsigned long, 2> {
Halton sequence generator.
Definition ilds.hpp:83
auto value_at(unsigned long n) const -> array< unsigned long, 2 >
Evaluate the integer 2D Halton point at a given index (pure, no state change)
Definition ilds.hpp:112
Halton(const std::array< unsigned long, 2 > &base, const std::array< unsigned int, 2 > &scale)
Construct a new Halton object.
Definition ilds.hpp:98
Van der Corput sequence generator.
Definition ilds.hpp:32
auto value_at(unsigned long n) const -> unsigned long
Evaluate the integer sequence value at a given index (pure, no state change)
Definition ilds.hpp:68
VdCorput(unsigned long base=2, unsigned int scale=DEFAULT_SCALE)
Construct a new VdCorput object.
Definition ilds.hpp:46
CRTP base implementing the sequence generator protocol.
Definition lds.hpp:182
Concept for the sequence generator protocol.
Definition lds.hpp:155
Low-discrepancy sequence generators with thread-safe runtime polymorphism (ldsgen).
constexpr unsigned int DEFAULT_SCALE
Default number of digits for the Van der Corput sequence.
Definition ilds.hpp:23
constexpr unsigned int MAX_REVERSE_BITS
Definition ilds.hpp:24