|
| | HaltonN (const vector< unsigned long > &base) |
| | Construct a new Halton N object.
|
| |
| auto | value_at (unsigned long n) const -> vector< double > |
| | Evaluate the N-dimensional Halton point at a given index (pure, no state change)
|
| |
| auto | pop () -> vector< double > |
| | Generate the next value in the sequence (advances state).
|
| |
| auto | peek () -> vector< double > |
| | Peek at the next value without advancing state.
|
| |
| auto | skip (unsigned int n) -> void |
| | Skip n values in the sequence.
|
| |
| auto | reseed (const unsigned long &seed) -> void |
| | Reset the generator to a specific seed value.
|
| |
| auto | get_index () const -> unsigned long |
| | Get current index in the sequence.
|
| |
Halton(n) sequence generator.
The HaltonN class is a sequence generator that generates points in a N-dimensional space using the Halton sequence. The Halton sequence is a low-discrepancy sequence that is commonly used in quasi-Monte Carlo methods. It is generated by iterating over two different bases and calculating the fractional parts of the numbers in those bases. The HaltonN class keeps track of the current count and bases, and provides a pop() method that returns the next point in the sequence as a std::vector<double>.
* HaltonN([2,3,5]) sequence (3D):
* pop() -> [0.5, 0.333, 0.2] (VdC bases [2,3,5])
* pop() -> [0.25, 0.666, 0.4] (next in each sequence)
* pop() -> [0.75, 0.111, 0.6] (etc...)
* ...
*