6#ifndef THEORETICA_QUASIRANDOM_H
7#define THEORETICA_QUASIRANDOM_H
9#include "../core/real_analysis.h"
10#include "../algebra/algebra_types.h"
54 template<
unsigned int N>
58 for (
unsigned int i = 0; i < N; ++i)
Main namespace of the library which contains all functions and objects.
Definition algebra.h:27
double real
A real number, defined as a floating point type.
Definition constants.h:198
vec< real, 2 > vec2
A 2-dimensional vector with real elements.
Definition algebra_types.h:39
vec< real, N > qrand_weyl_multi(unsigned int n, real alpha)
Weyl quasi-random sequence in N dimensions.
Definition quasirandom.h:55
std::remove_reference_t< decltype(std::declval< Structure >()[0])> vector_element_t
Extract the type of a vector (or any indexable container) from its operator[].
Definition core_traits.h:134
constexpr real INVPHI
The inverse of the Golden Section mathematical constant.
Definition constants.h:213
real qrand_weyl_recurr(real prev=0, real alpha=INVPHI)
Weyl quasi-random sequence (computed with recurrence relation)
Definition quasirandom.h:38
real fract(real x)
Compute the fractional part of a real number.
Definition real_analysis.h:288
real qrand_weyl(unsigned int n, real alpha=INVPHI)
Weyl quasi-random sequence.
Definition quasirandom.h:24
vec2 qrand_weyl2(unsigned int n, real alpha=0.7548776662466927)
Weyl quasi-random sequence in 2 dimensions.
Definition quasirandom.h:70
dual2 square(dual2 x)
Return the square of a second order dual number.
Definition dual2_functions.h:23
dual2 pow(dual2 x, int n)
Compute the n-th power of a second order dual number.
Definition dual2_functions.h:41