Recti 1.2.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ilds::Halton< Base1, Base2 > Class Template Reference

Halton sequence generator. More...

#include <ilds.hpp>

Public Member Functions

constexpr Halton (const std::array< unsigned int, 2 > &scale)
 Construct a new Halton object.
 
constexpr auto pop () -> array< unsigned long, 2 >
 Generate the next point in the Halton sequence.
 
constexpr auto reseed (const unsigned long &seed) -> void
 Reset the state of the Halton sequence generator.
 

Detailed Description

template<unsigned long Base1, unsigned long Base2>
class ilds::Halton< Base1, Base2 >

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)
*     ...
* 
Template Parameters
Base1Base for the first dimension.
Base2Base for the second dimension.

Constructor & Destructor Documentation

◆ Halton()

template<unsigned long Base1, unsigned long Base2>
constexpr ilds::Halton< Base1, Base2 >::Halton ( const std::array< unsigned int, 2 > &  scale)
inlineexplicitconstexpr

Construct a new Halton object.

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

Parameters
[in]scalearray of two unsigned int values representing the number of digits for each generator

Member Function Documentation

◆ pop()

template<unsigned long Base1, unsigned long Base2>
constexpr auto ilds::Halton< Base1, Base2 >::pop ( ) -> array<unsigned long, 2>
inlineconstexpr

Generate the next point in the Halton sequence.

Returns the next point in the Halton sequence as an array of two unsigned long values.

Returns
array<unsigned long, 2> the next point in the sequence

◆ reseed()

template<unsigned long Base1, unsigned long Base2>
constexpr auto ilds::Halton< Base1, Base2 >::reseed ( const unsigned long &  seed) -> void
inlineconstexpr

Reset the state of the Halton sequence generator.

Resets the state of the sequence generator to a specific seed value.

Parameters
[in]seedthe seed value to reset the sequence generator to

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