LdsGen 1.2.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ildsgen::Halton Class Reference

Halton sequence generator. More...

#include <ilds.hpp>

Inheritance diagram for ildsgen::Halton:
[legend]
Collaboration diagram for ildsgen::Halton:
[legend]

Public Member Functions

 Halton (const std::array< unsigned long, 2 > &base, const std::array< unsigned int, 2 > &scale)
 Construct a new Halton object.
 
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)
 
- Public Member Functions inherited from ldsgen::GeneratorBase< Halton, array< unsigned long, 2 > >
auto pop () -> array< unsigned long, 2 >
 Generate the next value in the sequence (advances state).
 
auto peek () -> array< unsigned long, 2 >
 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.
 

Additional Inherited Members

- Protected Attributes inherited from ldsgen::GeneratorBase< Halton, array< unsigned long, 2 > >
std::atomic< unsigned long > count_
 Current sequence index (single source of state)
 

Detailed Description

Halton sequence generator.

*     Integer Halton([2,3], [2,2]):
*     pop() -> [1, 4]   (VdC_i(2,2,2), VdC_i(2,3,2))
*     pop() -> [2, 5]   (next in each sequence)
*     ...
* 

Constructor & Destructor Documentation

◆ Halton()

ildsgen::Halton::Halton ( const std::array< unsigned long, 2 > &  base,
const std::array< unsigned int, 2 > &  scale 
)
inlineexplicit

Construct a new Halton object.

Constructs a Halton sequence generator with the specified bases and scale values.

Parameters
[in]basearray of two unsigned long values representing the bases for the two Van der Corput generators
[in]scalearray of two unsigned int values representing the number of digits for each generator

Member Function Documentation

◆ value_at()

auto ildsgen::Halton::value_at ( unsigned long  n) const -> array<unsigned long, 2>
inline

Evaluate the integer 2D Halton point at a given index (pure, no state change)

\[ H(n) = (\phi_{b_1}^{\mathbb{Z}}(n), \phi_{b_2}^{\mathbb{Z}}(n)) \]

Parameters
[in]nThe sequence index.
Returns
The integer 2D Halton point for index n.

The documentation for this class was generated from the following file: