Mercurial > hg > octave-lyh
diff liboctave/ODEFunc.h @ 4049:a35a3c5d4740
[project @ 2002-08-16 08:54:31 by jwe]
author | jwe |
---|---|
date | Fri, 16 Aug 2002 08:54:31 +0000 |
parents | 8b262e771614 |
children | 4c8a2e4e0717 |
line wrap: on
line diff
--- a/liboctave/ODEFunc.h +++ b/liboctave/ODEFunc.h @@ -35,16 +35,16 @@ typedef Matrix (*ODEJacFunc) (const ColumnVector&, double); ODEFunc (void) - : fun (0), jac (0) { } + : fun (0), jac (0), reset (true) { } ODEFunc (ODERHSFunc f) - : fun (f), jac (0) { } + : fun (f), jac (0), reset (true) { } ODEFunc (ODERHSFunc f, ODEJacFunc j) - : fun (f), jac (j) { } + : fun (f), jac (j), reset (true) { } ODEFunc (const ODEFunc& a) - : fun (a.fun), jac (a.jac) { } + : fun (a.fun), jac (a.jac), reset (true) { } ODEFunc& operator = (const ODEFunc& a) { @@ -52,6 +52,7 @@ { fun = a.fun; jac = a.jac; + reset = a.reset; } return *this; } @@ -63,6 +64,7 @@ ODEFunc& set_function (ODERHSFunc f) { fun = f; + reset = true; return *this; } @@ -71,6 +73,7 @@ ODEFunc& set_jacobian_function (ODEJacFunc j) { jac = j; + reset = true; return *this; } @@ -78,6 +81,13 @@ ODERHSFunc fun; ODEJacFunc jac; + + // This variable is TRUE when this object is constructed, and also + // after any internal data has changed. Derived classes may use + // this information (and change it) to know when to (re)initialize + // their own internal data related to this object. + + bool reset; }; #endif