class
#include <ldsgen/lds.hpp>
VdCorput Van der Corput sequence generator.
VdCorput
is a class that generates the Van der Corput sequence. The Van der Corput sequence is a low-discrepancy sequence that is commonly used in quasi-Monte Carlo methods. The sequence is generated by iterating over a base and calculating the fractional part of the number in that base. The VdCorput
class keeps track of the current count and base, and provides a pop()
method that returns the next value in the sequence.
Public functions
- auto VdCorput(size_t base) -> CONSTEXPR14 explicit
- Construct a new VdCorput object.
- auto pop() -> double -> CONSTEXPR14 auto
- pop
- auto reseed(size_t seed) -> void -> CONSTEXPR14 auto
- reseed
Function documentation
CONSTEXPR14 ldsgen:: VdCorput:: VdCorput(size_t base) explicit
Construct a new VdCorput object.
Parameters | |
---|---|
base in | the base of the Van der Corput sequence |
The VdCorput(size_
constructor is initializing a VdCorput
object with a given base. The base is used to generate the Van der Corput sequence.
CONSTEXPR14 auto ldsgen:: VdCorput:: pop() -> double
pop
Returns | double |
---|
The auto pop() -> double
function is a member function of the VdCorput
class. It returns a double
value. This function is used to generate the next value in the Van der Corput sequence. It increments the count and calculates the Van der Corput sequence value for that count and base.
CONSTEXPR14 auto ldsgen:: VdCorput:: reseed(size_t seed) -> void
reseed
Parameters | |
---|---|
seed in | the seed value to reset the sequence generator to |
The reseed(size_
function is used to reset the state of the sequence generator to a specific seed value. This allows the sequence generator to start generating the sequence from the beginning, or from a specific point in the sequence, depending on the value of the seed.