LdsGen 1.2.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ldsgen::Sphere3Hopf Class Reference

S(3) sequence generator by Hopf fibration. More...

#include <lds.hpp>

Inheritance diagram for ldsgen::Sphere3Hopf:
[legend]
Collaboration diagram for ldsgen::Sphere3Hopf:
[legend]

Public Member Functions

 Sphere3Hopf (const unsigned long base0, const unsigned long base1, const unsigned long base2)
 Construct a new Sphere 3 Hopf object.
 
auto value_at (unsigned long n) const -> std::array< double, 4 >
 Evaluate the point on the 3-sphere at a given index (pure, no state change)
 
- Public Member Functions inherited from ldsgen::GeneratorIterable< Sphere3Hopf, std::array< double, 4 > >
auto begin () -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > >
 Get iterator to beginning.
 
auto end () const -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > >
 Get iterator to end (infinite sequence)
 
- Public Member Functions inherited from ldsgen::GeneratorBase< Derived, Value >
auto pop () -> Value
 Generate the next value in the sequence (advances state).
 
auto peek () -> Value
 Peek at the next value without advancing state.
 
auto skip (unsigned int n) -> void
 Skip n values in the sequence.
 
auto reseed (const unsigned long &seed) -> void
 Reset the generator to a specific seed value.
 
auto get_index () const -> unsigned long
 Get current index in the sequence.
 

Additional Inherited Members

- Protected Attributes inherited from ldsgen::GeneratorBase< Derived, Value >
std::atomic< unsigned long > count_ {0}
 Current sequence index (single source of state)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Sphere3Hopf()

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

Construct a new Sphere 3 Hopf object.

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

Parameters
[in]base0the base for the first Van der Corput generator (phi coordinate)
[in]base1the base for the second Van der Corput generator (psi coordinate)
[in]base2the base for the third Van der Corput generator (eta coordinate)

Member Function Documentation

◆ value_at()

auto ldsgen::Sphere3Hopf::value_at ( unsigned long  n) const -> std::array<double, 4>
inline

Evaluate the point on the 3-sphere at a given index (pure, no state change)

Uses the Hopf fibration parametrization:

\[ \begin{aligned} x &= \cos\eta\cos\psi \\ y &= \cos\eta\sin\psi \\ z &= \sin\eta\cos(\phi + \psi) \\ w &= \sin\eta\sin(\phi + \psi) \end{aligned} \]

where \( \phi = 2\pi\phi_{b_0}(n) \), \( \psi = 2\pi\phi_{b_1}(n) \), and \( \eta = \arccos\sqrt{\phi_{b_2}(n)} \).

Parameters
[in]nThe sequence index.
Returns
The point on the 3-sphere for index n.

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