ldsgen::Sphere3Hopf class

S(3) sequence generator by Hopf fibration.

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)
*      \               /
*       '.           .'
*         '-.....-'
* 

Constructors, destructors, conversion operators

Sphere3Hopf(const unsigned long base0, const unsigned long base1, const unsigned long base2)
Construct a new Sphere 3 Hopf object.

Public functions

auto pop() -> std::array< double, 4 > -> auto
Generate the next point on the 3-sphere using Hopf fibration.
auto peek() -> std::array< double, 4 > -> auto
Peek at the next value without advancing state.
auto skip(unsigned int n) -> void -> auto
Skip n values in the sequence.
auto reseed(unsigned long seed) -> void -> auto
Reset the state of the Sphere3Hopf sequence generator.
auto get_index() const -> unsigned long -> auto
Get current index.
auto begin() -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > > -> auto
Get iterator to beginning.
auto end() const -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > > -> auto
Get iterator to end (infinite sequence)

Function documentation

ldsgen::Sphere3Hopf::Sphere3Hopf(const unsigned long base0, const unsigned long base1, const unsigned long base2)

Construct a new Sphere 3 Hopf object.

Parameters
base0 in the base for the first Van der Corput generator (phi coordinate)
base1 in the base for the second Van der Corput generator (psi coordinate)
base2 in the base for the third Van der Corput generator (eta coordinate)

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

auto ldsgen::Sphere3Hopf::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.

auto ldsgen::Sphere3Hopf::peek() -> std::array< double, 4 >

Peek at the next value without advancing state.

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

auto ldsgen::Sphere3Hopf::skip(unsigned int n) -> void

Skip n values in the sequence.

Parameters
in number of values to skip

auto ldsgen::Sphere3Hopf::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.

auto ldsgen::Sphere3Hopf::get_index() const -> unsigned long

Get current index.

Returns unsigned long current index in sequence

auto ldsgen::Sphere3Hopf::begin() -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > >

Get iterator to beginning.

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

auto ldsgen::Sphere3Hopf::end() const -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > >

Get iterator to end (infinite sequence)

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