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:
1940e75
)
only print averages when multiple iterations
author
stevenj
<stevenj@alum.mit.edu>
Mon, 1 Sep 2008 20:04:58 +0000
(16:04 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Mon, 1 Sep 2008 20:04:58 +0000
(16:04 -0400)
darcs-hash:
20080901200458
-c8de0-
6caef5668ed83a0897ef492107ee36322d18d1ca
.gz
test/testopt.cpp
patch
|
blob
|
history
diff --git
a/test/testopt.cpp
b/test/testopt.cpp
index 561c084154f3bc3c252401887b869894aabddd49..98ce278860807fda0dedd2ff6813b72f422b2b0e 100644
(file)
--- a/
test/testopt.cpp
+++ b/
test/testopt.cpp
@@
-195,7
+195,8
@@
static int test_function(int ifunc)
return 0;
}
}
- printf("average #evaluations = %g\naverage |f-minf| = %g, max |f-minf| = %g\n", total_count * 1.0 / iterations, total_err / iterations, max_err);
+ if (iterations > 1)
+ printf("average #evaluations = %g\naverage |f-minf| = %g, max |f-minf| = %g\n", total_count * 1.0 / iterations, total_err / iterations, max_err);
free(x);
return 1;