Skip to content
Browse files

now the ADOL-C code is left intact, i.e. the protected constructors o…

…f adub do not have to changed to be public.
  • Loading branch information...
1 parent 4a94cc9 commit 7ab36132aabe549e0fcf45ccb312c7d33c93d9e3 basti committed Jun 13, 2009
Showing with 9 additions and 12 deletions.
  1. +5 −9 adolc-2.0.0/adolc/adouble.h
  2. +4 −3 py_adolc.hpp
View
14 adolc-2.0.0/adolc/adouble.h
@@ -1,17 +1,15 @@
/* ---------------------------------------------------------------------------
ADOL-C -- Automatic Differentiation by Overloading in C++
- Revision: $Id: adouble.h 278 2008-12-19 09:11:26Z awalther $
+ Revision: $Id: adouble.h 295 2009-02-25 13:32:25Z awalther $
Contents: adouble.h contains the basis for the class of adouble
included here are all the possible functions defined on
the adouble class. Notice that, as opposed to ealier versions,
both the class adub and the class adouble are derived from a base
class (badouble). See below for further explanation.
- Copyright (c) 2008
- Technical University Dresden
- Department of Mathematics
- Institute of Scientific Computing
+ Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
+ Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
This file is part of ADOL-C. This software is provided as open source.
Any use, reproduction, or distribution of the software constitutes
@@ -30,8 +28,6 @@
#include <cstdlib>
#include <iostream>
#include <cmath>
-
-
using std::cout;
using std::cin;
using std::cerr;
@@ -257,7 +253,7 @@ class ADOLC_DLL_EXPORT badouble {
class ADOLC_DLL_EXPORT adub:public badouble {
friend ADOLC_DLL_EXPORT class adouble;
-public:
+protected:
adub( locint lo ):badouble(lo) {};
adub( void ):badouble(0) {
fprintf(DIAG_OUT,"ADOL-C error: illegal default construction of adub"
@@ -1468,7 +1464,7 @@ while (c!=')' && !in.eof());
while (c!=')' && !in.eof());
return in;
}
-};
+}
/****************************************************************************/
#endif /* ADOLC_TAPELESS */
View
7 py_adolc.hpp
@@ -356,10 +356,11 @@ BOOST_PYTHON_MODULE(_adolc)
.def("fmin", fmin_adub_badouble_double)
;
- class_<adub, bases<badouble> >("adub",init<locint>())
- .def(init<const adub &>())
+ class_<adub, bases<badouble> >("adub", no_init)
+// .def(init<locint>())
+// .def(init<const adub &>())
;
-
+
class_<adouble, bases<badouble> >("adouble", init<double>())
.def(init<const adouble&>())
.def(init<const adub&>())

0 comments on commit 7ab3613

Please sign in to comment.
Something went wrong with that request. Please try again.