ldsgen::SphereN class

N-dimensional sphere sequence generator.

Generates points on an N-dimensional sphere using a recursive approach.

Base classes

class SphereGen
Base class for sphere generators.

Constructors, destructors, conversion operators

SphereN(std::span<const unsigned long> base) explicit
Construct a new SphereN object.

Public functions

auto pop() -> std::vector<double> override
Generate the next point on the N-dimensional sphere.
void reseed(unsigned long seed) override
Reset the state of the SphereN generator.

Function documentation

ldsgen::SphereN::SphereN(std::span<const unsigned long> base) explicit

Construct a new SphereN object.

Parameters
base in span of uint64_t values representing the bases for the generators

Constructs an N-dimensional sphere sequence generator with the specified bases.

std::vector<double> ldsgen::SphereN::pop() override

Generate the next point on the N-dimensional sphere.

Returns std::vector<double> the next point on the N-dimensional sphere

Returns the next point on the N-dimensional sphere as a vector of double values.

void ldsgen::SphereN::reseed(unsigned long seed) override

Reset the state of the SphereN 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.