#include <lds/lds.hpp>
Disk class
Disk sequence generator.
The Disk class is a sequence generator that generates points in a 2-dimensional space using the Disk sequence. The Disk 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 Disk 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::array<double, 2>.
* Unit Disk: * ***** * *** *** * ** ** * * * * * * More evenly * * * distributed * ** ** than random * *** *** * ***** *
Public functions
- auto Disk() -> constexpr
- Construct a new Disk object.
- auto pop() -> std::array< double, 2 > -> constexpr auto
- Generate the next point in the unit disk.
- auto peek() -> std::array< double, 2 > -> constexpr auto
- Peek at the next value without advancing state.
- auto skip(unsigned long n) -> void -> constexpr auto
- Skip n values in the sequence.
- auto reseed(const unsigned long& seed) -> void -> constexpr auto
- Reset the state of the Disk sequence generator.
- auto get_index() const -> unsigned long -> constexpr auto
- Get current index.
- auto begin() -> GeneratorIterator< Disk, std::array< double, 2 > > -> constexpr auto
- Get iterator to beginning.
- auto end() const -> GeneratorIterator< Disk, std::array< double, 2 > > -> constexpr auto
- Get iterator to end (infinite sequence)