chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c70c0a
)
allow NULL to be passed to sobol routines to fall back on pseudo-random
author
stevenj
<stevenj@alum.mit.edu>
Thu, 6 Sep 2007 01:50:46 +0000
(21:50 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Thu, 6 Sep 2007 01:50:46 +0000
(21:50 -0400)
darcs-hash:
20070906015046
-c8de0-
6a3da0b8e0b19d904995ceae6c5d798568a3c301
.gz
util/sobolseq.c
patch
|
blob
|
history
diff --git
a/util/sobolseq.c
b/util/sobolseq.c
index c4d38cdc72393baf8fc0254e3e8431cc6cde29ff..895152b8e648046646875007af56c367ab4e880a 100644
(file)
--- a/
util/sobolseq.c
+++ b/
util/sobolseq.c
@@
-230,7
+230,7
@@
extern void nlopt_sobol_destroy(nlopt_sobol s)
/* next vector x[sdim] in Sobol sequence, with each x[i] in (0,1) */
void nlopt_sobol_next01(nlopt_sobol s, double *x)
{
- if (!sobol_gen(s, x)) {
+ if (!s
|| !s
obol_gen(s, x)) {
/* fall back on pseudo random numbers in the unlikely event
that we exceed 2^32-1 points */
unsigned i;