ldsgen namespace

Classes

class Circle
Circle sequence generator.
class Disk
Disk sequence generator.
template<typename Generator, typename Value>
class GeneratorIterator
Forward iterator for sequence generators.
class Halton
Halton sequence generator.
class HaltonN
Halton(n) sequence generator.
class Sphere
Sphere sequence generator.
class Sphere3
3-Sphere sequence generator
class Sphere3Hopf
S(3) sequence generator by Hopf fibration.
class SphereGen
Base class for sphere generators.
class SphereN
N-dimensional sphere sequence generator.
class SphereWrapper
Wrapper class to make Sphere compatible with SphereGen interface.
class VdCorput
Van der Corput sequence generator.

Functions

auto vdc(unsigned long count, unsigned long base) -> double -> auto constexpr
Van der Corput sequence.
auto dummy(unsigned int index) -> unsigned long
void log_with_spdlog(const std::string& message)
Log a message using spdlog.
auto linspace(double start, double stop, unsigned int num) -> std::vector<double>
Generate evenly spaced numbers over a specified interval.
auto simple_interp(double x_value, std::span<const double> x_points, std::span<const double> y_points) -> double
Perform one-dimensional linear interpolation.
auto get_tp(unsigned int n) -> std::vector<double>
Calculate the table-lookup of the mapping function for n.

Variables

const auto TWO_PI constexpr
unsigned int MAX_REVERSE_BITS constexpr
double MAPPING_FACTOR constexpr
double PI constexpr
double HALF_PI constexpr

Function documentation

auto ldsgen::vdc(unsigned long count, unsigned long base) -> double constexpr

Van der Corput sequence.

Parameters
count in index of the sequence
base in base of the sequence
Returns double

The vdc function is calculating the Van der Corput sequence value for a given index count and base base. It returns a double value.

*     Base 2 Example:
*     count=1 -> 0.5  (0.1 in base 2)
*     count=2 -> 0.25 (0.01 in base 2)
*     count=3 -> 0.75 (0.11 in base 2)
*     count=4 -> 0.125(0.001 in base 2)
* 

unsigned long ldsgen::dummy(unsigned int index)

void ldsgen::log_with_spdlog(const std::string& message)

Log a message using spdlog.

Parameters
message The message to log

This function provides a simple wrapper around spdlog for logging messages. It creates a file logger that writes to "ldsgen.log" and logs at the info level.

std::vector<double> ldsgen::linspace(double start, double stop, unsigned int num)

Generate evenly spaced numbers over a specified interval.

Parameters
start in the starting value of the sequence
stop in the end value of the sequence
num in number of samples to generate
Returns std::vector<double> vector of evenly spaced numbers

Simple implementation of numpy.linspace.

double ldsgen::simple_interp(double x_value, std::span<const double> x_points, std::span<const double> y_points)

Perform one-dimensional linear interpolation.

Parameters
x_value in the x-coordinate at which to evaluate the interpolated value
x_points in the x-coordinates of the data points
y_points in the y-coordinates of the data points
Returns double the interpolated value at x_value

Simple implementation of numpy.interp for 1D interpolation.

std::vector<double> ldsgen::get_tp(unsigned int n)

Calculate the table-lookup of the mapping function for n.

Parameters
in the dimension parameter
Returns std::vector<double> the table-lookup values

Calculates the table-lookup of the mapping function for n.

Variable documentation

const auto ldsgen::TWO_PI constexpr

unsigned int ldsgen::MAX_REVERSE_BITS constexpr

double ldsgen::MAPPING_FACTOR constexpr

double ldsgen::PI constexpr

double ldsgen::HALF_PI constexpr