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

S(3) sequence generator by Hopf fibration.

Template parameters
Base0 the base for the first van der Corput generator (phi coordinate)
Base1 the base for the second van der Corput generator (psi coordinate)
Base2 the base for the third van der Corput generator (eta coordinate)

The Sphere3Hopf class is a sequence generator that generates points on a 3-sphere using the Hopf fibration. It uses three instances of the VdCorput class to generate the sequence values and maps them to points on the 3-sphere. The pop() method returns the next point on the 3-sphere as a std::array<double, 4>, where the first three elements represent the x, y, and z coordinates of the point, and the fourth element represents the w coordinate. The reseed() method is used to reset the state of the sequence generator to a specific seed value.

*     3-Sphere (S3) visualization:
*     A 4D hypersphere where points (x,y,z,w)
*     satisfy x²+y²+z²+w² = 1
*
*         4D hypersurface
*            _____
*         .-'     '-.
*       ,'           ',
*      /               \
*     |        O        |  (4D analog of sphere)
*      \               /
*       '.           .'
*         '-.....-'
* 

Public functions

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

Function documentation

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

Construct a new Sphere 3 Hopf object.

Constructs a 3-sphere sequence generator using the Hopf fibration with the specified bases.

template<unsigned long Base0, unsigned long Base1, unsigned long Base2>
constexpr auto lds::Sphere3Hopf<Base0, Base1, Base2>::pop() -> std::array< double, 4 >

Generate the next point on the 3-sphere using Hopf fibration.

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

Returns the next point on the 3-sphere using the Hopf fibration as an array of four double values.

template<unsigned long Base0, unsigned long Base1, unsigned long Base2>
constexpr auto lds::Sphere3Hopf<Base0, Base1, Base2>::peek() -> std::array< double, 4 >

Peek at the next value without advancing state.

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

template<unsigned long Base0, unsigned long Base1, unsigned long Base2>
constexpr auto lds::Sphere3Hopf<Base0, Base1, Base2>::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, unsigned long Base2>
constexpr auto lds::Sphere3Hopf<Base0, Base1, Base2>::reseed(unsigned long seed) -> void

Reset the state of the Sphere3Hopf 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, unsigned long Base2>
constexpr auto lds::Sphere3Hopf<Base0, Base1, Base2>::get_index() const -> unsigned long

Get current index.

Returns unsigned long current index in sequence

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

Get iterator to beginning.

Returns GeneratorIterator<Sphere3Hopf, std::array<double, 4>>

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

Get iterator to end (infinite sequence)

Returns GeneratorIterator<Sphere3Hopf, std::array<double, 4>>