aboutsummaryrefslogtreecommitdiff
path: root/random/include
diff options
context:
space:
mode:
Diffstat (limited to 'random/include')
-rw-r--r--random/include/random/normal.h9
-rw-r--r--random/include/random/random.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/random/include/random/normal.h b/random/include/random/normal.h
new file mode 100644
index 0000000..bee32a9
--- /dev/null
+++ b/random/include/random/normal.h
@@ -0,0 +1,9 @@
1#pragma once
2
3/// Generate two samples from the standard normal distribution.
4///
5/// |u| and |v| must be uniformly distributed in (0,1).
6void normal2(double u, double v, double* z0, double* z1);
7
8/// Map a sample from a standard normal distribution to an arbitrary normal.
9double normal_transform(double z, double mu, double sigma);
diff --git a/random/include/random/random.h b/random/include/random/random.h
index 5499f62..1f4a48d 100644
--- a/random/include/random/random.h
+++ b/random/include/random/random.h
@@ -1,3 +1,5 @@
1#pragma once 1#pragma once
2 2
3#include <random/mt19937-64.h> 3#include <random/mt19937-64.h>
4#include <random/normal.h>
5