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:
54c41b0
)
no need for opt::reinit since we have = operator
author
stevenj
<stevenj@alum.mit.edu>
Wed, 2 Jun 2010 05:25:37 +0000
(
01:25
-0400)
committer
stevenj
<stevenj@alum.mit.edu>
Wed, 2 Jun 2010 05:25:37 +0000
(
01:25
-0400)
darcs-hash:
20100602052537
-c8de0-
526082e36d2563e1506b393e5564b7b0129a89d4
.gz
api/nlopt-in.hpp
patch
|
blob
|
history
diff --git
a/api/nlopt-in.hpp
b/api/nlopt-in.hpp
index 65cfde9202c19102498d6cb3f403b8cf46943114..5e75ae6be52106986545efd28e36e9a7929c5695 100644
(file)
--- a/
api/nlopt-in.hpp
+++ b/
api/nlopt-in.hpp
@@
-125,12
+125,6
@@
namespace nlopt {
if (!o) throw std::bad_alloc();
nlopt_set_free_f_data(o, 1);
}
- void reinit(algorithm a, unsigned n) {
- if (o) nlopt_destroy(o);
- o = nlopt_create(nlopt_algorithm(a), n);
- if (!o) throw std::bad_alloc();
- nlopt_set_free_f_data(o, 1);
- }
opt(const opt& from) : o(nlopt_copy(from.o)) {
if (from.o && !o) throw std::bad_alloc();
mythrow(nlopt_dup_f_data(o, sizeof(myfunc_data)));