SDDSlib
|
Implementation of Halton and modified Halton sequences. More...
#include "mdb.h"
Go to the source code of this file.
Macros | |
#define | N_SEQ_PREDEFINED 12 |
#define | MAX_D 500 |
Functions | |
int32_t | startHaltonSequence (int32_t *radix, double value) |
Initialize and start a new Halton sequence. | |
int32_t | restartHaltonSequence (long ID, double value) |
Restart an existing Halton sequence from a new initial value. | |
double | nextHaltonSequencePoint (long ID) |
Get the next point in a Halton sequence. | |
int32_t | power (int32_t a, int32_t b, int32_t m) |
int32_t | primes () |
int | inhalt (int dimen, int atmost, double tiny, double *quasi) |
int32_t | startModHaltonSequence (int32_t *radix, double tiny) |
Start a modified Halton sequence. | |
int32_t | restartModHaltonSequence (long ID, double tiny) |
Restart an existing modified Halton sequence. | |
int32_t | generateModHaltSequence (double *quasi, double *dq, double *wq, long ID) |
double | nextModHaltonSequencePoint (long ID) |
Retrieve the next point from the modified Halton sequence. | |
Variables | |
static double * | lastPointValue = NULL |
static long * | R = NULL |
static long | sequencesInUse = 0 |
static long | Rvalues [N_SEQ_PREDEFINED] = {2, 3, 5, 7, 11, 19, 23, 29, 37, 47, 59, 67} |
static int32_t | sDim = 12 |
static int32_t | nextPoint [12] |
static double | eError |
static int32_t | prime [] |
static double | iprime [] |
static int32_t | modSequenceInUse = 0 |
static int32_t | primroots [][10] |
static int32_t | warnockOpt [] |
static double * | quasi = NULL |
Implementation of Halton and modified Halton sequences.
Definition in file halton.c.
int32_t generateModHaltSequence | ( | double * | quasi, |
double * | dq, | ||
double * | wq, | ||
long | ID ) |
Definition at line 550 of file halton.c.
int inhalt | ( | int | dimen, |
int | atmost, | ||
double | tiny, | ||
double * | quasi ) |
Definition at line 468 of file halton.c.
double nextHaltonSequencePoint | ( | long | ID | ) |
Get the next point in a Halton sequence.
Computes the next value in the specified Halton sequence.
ID | The sequence ID. |
Definition at line 107 of file halton.c.
double nextModHaltonSequencePoint | ( | long | ID | ) |
Retrieve the next point from the modified Halton sequence.
Generates and returns the next value for a given sequence ID in the modified Halton sequence.
ID | The sequence ID. |
Definition at line 624 of file halton.c.
int32_t power | ( | int32_t | a, |
int32_t | b, | ||
int32_t | m ) |
int32_t primes | ( | ) |
Definition at line 451 of file halton.c.
int32_t restartHaltonSequence | ( | long | ID, |
double | value ) |
Restart an existing Halton sequence from a new initial value.
Resets the specified Halton sequence so that subsequent calls will continue from the given initial value.
ID | The sequence ID to restart. |
value | The new starting value. |
Definition at line 88 of file halton.c.
int32_t restartModHaltonSequence | ( | long | ID, |
double | tiny ) |
Restart an existing modified Halton sequence.
Resets internal parameters so that the modified Halton sequence restarts.
ID | The sequence ID. |
tiny | A small tolerance value. |
Definition at line 538 of file halton.c.
int32_t startHaltonSequence | ( | int32_t * | radix, |
double | value ) |
Initialize and start a new Halton sequence.
Initializes a new Halton sequence with the given radix and starting value. If the provided radix is not a prime or is non-positive, a suitable prime is chosen.
radix | Pointer to an integer specifying the desired prime radix. If non-positive, a prime is chosen automatically. |
value | The starting value for the sequence. |
Definition at line 38 of file halton.c.
int32_t startModHaltonSequence | ( | int32_t * | radix, |
double | tiny ) |
Start a modified Halton sequence.
Initializes a modified Halton sequence with predefined prime bases and internal parameters.
radix | Pointer to an integer to store the chosen prime radix. |
tiny | A small tolerance value. |
Definition at line 508 of file halton.c.
|
static |
Definition at line 231 of file halton.c.
|
static |
Definition at line 134 of file halton.c.
|
static |
Definition at line 330 of file halton.c.
|
static |
|
static |
Definition at line 340 of file halton.c.