Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-09-26 21:54:27 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-26 21:54:27 +0300
commit47e6d53c8a062dfb24ded58dffa88f276468cb3e (patch)
tree379fd539df8e86c5ac12510fb7edddc4518d37f9 /source/blender/blenlib/BLI_rand.h
parent5c45fe293712311a0bd33fe1aa9f4beca7a85fca (diff)
BLI_rand : Add new low-discrepency sequences generator
Diffstat (limited to 'source/blender/blenlib/BLI_rand.h')
-rw-r--r--source/blender/blenlib/BLI_rand.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h
index f36d2faa1b8..0ef971bf41f 100644
--- a/source/blender/blenlib/BLI_rand.h
+++ b/source/blender/blenlib/BLI_rand.h
@@ -101,4 +101,15 @@ RNG_THREAD_ARRAY *BLI_rng_threaded_new(void);
void BLI_rng_threaded_free(struct RNG_THREAD_ARRAY *rngarr) ATTR_NONNULL(1);
int BLI_rng_thread_rand(RNG_THREAD_ARRAY *rngarr, int thread) ATTR_WARN_UNUSED_RESULT;
+/** Low-discrepancy sequences **/
+
+/** Return the _n_th number of the given low-discrepancy sequence. */
+void BLI_halton_1D(unsigned int prime, double offset, int n, double *r);
+void BLI_halton_2D(unsigned int prime[2], double offset[2], int n, double *r);
+void BLI_hammersley_1D(unsigned int n, double *r);
+
+/** Return the whole low-discrepancy sequence up to _n_. */
+void BLI_halton_2D_sequence(unsigned int prime[2], double offset[2], int n, double *r);
+void BLI_hammersley_2D_sequence(unsigned int n, double *r);
+
#endif /* __BLI_RAND_H__ */