chiark / gitweb /
no need for opt::reinit since we have = operator
authorstevenj <stevenj@alum.mit.edu>
Wed, 2 Jun 2010 05:25:37 +0000 (01:25 -0400)
committerstevenj <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

index 65cfde9202c19102498d6cb3f403b8cf46943114..5e75ae6be52106986545efd28e36e9a7929c5695 100644 (file)
@@ -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)));