chiark / gitweb /
copyright etc. comments
authorstevenj <stevenj@alum.mit.edu>
Wed, 5 Sep 2007 21:23:56 +0000 (17:23 -0400)
committerstevenj <stevenj@alum.mit.edu>
Wed, 5 Sep 2007 21:23:56 +0000 (17:23 -0400)
darcs-hash:20070905212356-c8de0-23bbb4a4af7867599387cace7787eb63a07d16e3.gz

util/sobolseq.c
util/sobolseq.h

index 207c60caf227cd0175ab1288306cb2ee7219fed8..12c3d5d9a785b888fa51cbbe7d5079ea5a8d7092 100644 (file)
@@ -1,3 +1,50 @@
+/* Copyright (c) 2007 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+ */
+
+/* Generation of Sobol sequences in up to 1111 dimensions, based on the
+   algorithms described in:
+        P. Bratley and B. L. Fox, Algorithm 659, ACM Trans.
+       Math. Soft. 14 (1), 88-100 (1988),
+   as modified by:
+        S. Joe and F. Y. Kuo, ACM Trans. Math. Soft 29 (1), 49-57 (2003).
+
+   Note that the code below was written without even looking at the Fortran
+   code, which is only semi-free (being under the restrictive ACM copyright
+   terms).  Then I went to the Fortran code and took out the table of
+   primitive polynomials and starting direction #'s ... since this is just
+   a table of numbers generated by a deterministic algorithm, it is not
+   copyrightable.  (Obviously, the format of these tables necessitated
+   some slight modifications to the code.)
+
+   For the test integral of Joe and Kuo (see the main() program
+   below), I get exactly the same results for integrals up to 1111
+   dimensions compared to the table of published numbers (to the 5
+   published significant digits).
+
+   This is not to say that the authors above should not be credited for
+   their clear description of the algorithm (and their tabulation of
+   the critical numbers).  Please cite them.  Just that I needed
+   a free/open-source implementation. */
+
 #include <stdlib.h>
 
 #include "nlopt-util.h"
index dbf3216b94edbc3b8ed0cb46f400b6d169e24e9f..19efa5b0a25e2497411d79f5ef0d9f17261675ee 100644 (file)
@@ -1,3 +1,25 @@
+/* Copyright (c) 2007 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+ */
+
 #ifndef SOBOLSEQ_H
 #define SOBOLSEQ_H