#include <lds/lds.hpp>
template<unsigned long Base0 = 2, unsigned long Base1 = 3>
lds::Sphere class

Sphere sequence generator.

Template parameters
Base0 the base for the van der Corput generator (phi coordinate)
Base1 the base for the Circle generator (theta coordinate)

The Sphere class is a sequence generator that generates points on a unit sphere using the van der Corput sequence. It uses the VdCorput class to generate the sequence values and maps them to points on the unit sphere. The pop() method returns the next point on the unit sphere as a std::array<double, 3>, where the first element represents the x-coordinate, the second element represents the y-coordinate of the point, and the third element represents the z-coordinate of the point. The reseed() method is used to reset the state of the sequence generator to a specific seed value.

*     Unit Sphere:
*          *****
*       **       **
*     **           **
*    *               *
*    *      O        *  Points distributed
*    *               *  evenly on surface
*     **           **
*       **       **
*          *****
* 

Public functions

auto Sphere() -> constexpr
Construct a new Sphere object.
auto pop() -> std::array< double, 3 > -> constexpr auto
Generate the next point on the unit sphere.
auto peek() -> std::array< double, 3 > -> 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 Sphere sequence generator.
auto get_index() const -> unsigned long -> constexpr auto
Get current index.
auto begin() -> GeneratorIterator< Sphere, std::array< double, 3 > > -> constexpr auto
Get iterator to beginning.
auto end() const -> GeneratorIterator< Sphere, std::array< double, 3 > > -> constexpr auto
Get iterator to end (infinite sequence)

Function documentation

template<unsigned long Base0, unsigned long Base1>
constexpr lds::Sphere<Base0, Base1>::Sphere()

Construct a new Sphere object.

Constructs a Sphere sequence generator with the specified bases for generating points on the unit sphere.

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::pop() -> std::array< double, 3 >

Generate the next point on the unit sphere.

Returns std::array<double, 3> the next point on the unit sphere

Returns the next point on the unit sphere as an array of three double values.

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::peek() -> std::array< double, 3 >

Peek at the next value without advancing state.

Returns std::array<double, 3> next point on the sphere

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::skip(unsigned long n) -> void

Skip n values in the sequence.

Parameters
in number of values to skip

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::reseed(const unsigned long& seed) -> void

Reset the state of the Sphere sequence generator.

Parameters
seed in the seed value to reset the sequence generator to

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

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::get_index() const -> unsigned long

Get current index.

Returns unsigned long current index in sequence

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::begin() -> GeneratorIterator< Sphere, std::array< double, 3 > >

Get iterator to beginning.

Returns GeneratorIterator<Sphere, std::array<double, 3>>

template<unsigned long Base0, unsigned long Base1>
constexpr auto lds::Sphere<Base0, Base1>::end() const -> GeneratorIterator< Sphere, std::array< double, 3 > >

Get iterator to end (infinite sequence)

Returns GeneratorIterator<Sphere, std::array<double, 3>>