aboutsummaryrefslogtreecommitdiff
path: root/include/oracles.h
diff options
context:
space:
mode:
authorArun Isaac2021-02-03 19:40:10 +0530
committerArun Isaac2021-02-03 19:40:10 +0530
commit983f091af7849f259366f641b438ac1fee3df940 (patch)
treefd42196b6031638fd906afd8acbc5c26e34ce305 /include/oracles.h
parent707afdfe66dd9c931af77e4ff73186fd89ed27fd (diff)
downloadnsmc-983f091af7849f259366f641b438ac1fee3df940.tar.gz
nsmc-983f091af7849f259366f641b438ac1fee3df940.tar.lz
nsmc-983f091af7849f259366f641b438ac1fee3df940.zip
Move source files and headers to separate directories.
* extent-sampling.h, gaussian-nd-random.h, nd-random.h, oracles.h, utils.h: Move into include directory. * extent-sampling.c, gaussian-nd-random.c, nd-random.c, oracles.c, utils.c: Move into src directory. * CMakeLists.txt: Set include as include directory. Look for source files inside src directory.
Diffstat (limited to 'include/oracles.h')
-rw-r--r--include/oracles.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/oracles.h b/include/oracles.h
new file mode 100644
index 0000000..a661c94
--- /dev/null
+++ b/include/oracles.h
@@ -0,0 +1,37 @@
+#ifndef ORACLES_H
+#define ORACLES_H
+
+#include <gsl/gsl_blas.h>
+#include <gsl/gsl_rng.h>
+
+double bernoulli_extent_generator (const gsl_rng* r, double p, double r0, double r1);
+double bernoulli_true_volume (double p, double r0, double r1, unsigned int dimension);
+
+double uniform_extent_generator (const gsl_rng* r, double a, double b);
+double uniform_true_volume (double a, double b, unsigned int dimension);
+
+double beta_extent_generator (const gsl_rng* r, double alpha, double beta);
+double beta_true_volume (double alpha, double beta, unsigned int dimension);
+
+double symmetric_spiral_extent_oracle (const gsl_vector* x);
+
+double right_triangle_extent_oracle (const gsl_vector* x, double base, double height);
+double right_triangle_true_volume (double base, double height);
+
+double sphere_extent_oracle (const gsl_vector* x, double radius);
+double sphere_maximum_extent (double radius);
+
+double plane_extent_oracle (const gsl_vector* x, double displacement);
+
+double cube_extent_oracle (const gsl_vector* x, double edge);
+double cube_extent_oracle_with_center (const gsl_vector* x, const gsl_vector* center, double edge);
+double cube_true_volume (double edge, unsigned int dimension);
+double cube_maximum_extent (double edge, unsigned int dimension);
+
+double ellipsoid_extent_oracle (const gsl_vector* x, const gsl_vector* axes);
+double ellipsoid_true_volume (const gsl_vector* axes);
+
+double spheroid_extent_oracle (const gsl_vector* x, double eccentricity);
+double spheroid_true_volume (double eccentricity, unsigned int dimension);
+
+#endif