36 vector<std::unique_ptr<VdCorput>> vdcs;
46 explicit HaltonN(
const vector<unsigned long>& base) {
47 for (
const auto& base_value : base) {
48 this->vdcs.emplace_back(std::make_unique<ldsgen::VdCorput>(base_value));
62 auto value_at(
unsigned long n)
const -> vector<double> {
63 auto res = vector<double>{};
64 for (
const auto&
vdc : this->vdcs) {
65 res.emplace_back(
vdc->value_at(n));
72 static_assert(SequenceGenerator<HaltonN, vector<double>>);
CRTP base implementing the sequence generator protocol.
Definition lds.hpp:182
Halton(n) sequence generator.
Definition lds_n.hpp:34
auto value_at(unsigned long n) const -> vector< double >
Evaluate the N-dimensional Halton point at a given index (pure, no state change)
Definition lds_n.hpp:62
HaltonN(const vector< unsigned long > &base)
Construct a new Halton N object.
Definition lds_n.hpp:46
Low-discrepancy sequence generators with thread-safe runtime polymorphism (ldsgen).
constexpr auto vdc(unsigned long count, unsigned long base) -> double
Van der Corput sequence.
Definition lds.hpp:301