summaryrefslogtreecommitdiff
path: root/numlib/sobol.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 13:56:46 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 13:56:46 +0200
commit22f703cab05b7cd368f4de9e03991b7664dc5022 (patch)
tree6f4d50beaa42328e24b1c6b56b6ec059e4ef21a5 /numlib/sobol.h
Initial import of argyll version 1.5.1-8debian/1.5.1-8
Diffstat (limited to 'numlib/sobol.h')
-rw-r--r--numlib/sobol.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/numlib/sobol.h b/numlib/sobol.h
new file mode 100644
index 0000000..08ac5c0
--- /dev/null
+++ b/numlib/sobol.h
@@ -0,0 +1,52 @@
+#ifndef SOBOL_H
+#define SOBOL_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#define SOBOL_MAXBIT 30
+#define SOBOL_MAXDIM 40
+
+/* Object definition */
+struct _sobol {
+ /* Private: */
+ int dim; /* dimension we're set for */
+ unsigned int count;
+ double recipd;
+ int lastq[SOBOL_MAXDIM];
+ int dir[SOBOL_MAXBIT][SOBOL_MAXDIM];
+
+ /* Public: */
+ /* Methods */
+
+ /* Get the next sobol vector, return nz if we've run out */
+ /* Values are between 0.0 and 1.0 */
+ int (*next)(struct _sobol *s, double *v);
+
+ /* Rest to the begining of the sequence */
+ void (*reset)(struct _sobol *s);
+
+ /* We're done with the object */
+ void (*del)(struct _sobol *s);
+
+}; typedef struct _sobol sobol;
+
+/* Return NULL on error */
+sobol *new_sobol(int dim);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* SOBOL_H */
+
+
+
+
+
+
+
+
+
+