changeset 1864:e1c4dd0d503d

[project @ 1996-02-04 10:43:13 by jwe]
author jwe
date Sun, 04 Feb 1996 10:43:13 +0000
parents 986e565efd0a
children 0e095fed283c
files liboctave/NLFunc.h
diffstat 1 files changed, 14 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/NLFunc.h
+++ b/liboctave/NLFunc.h
@@ -1,7 +1,7 @@
 // NLFunc.h                                                -*- C++ -*-
 /*
 
-Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton
+Copyright (C) 1996 John W. Eaton
 
 This file is part of Octave.
 
@@ -27,7 +27,8 @@
 class ColumnVector;
 class Matrix;
 
-class NLFunc
+class
+NLFunc
 {
 public:
 
@@ -35,37 +36,29 @@
   typedef Matrix (*jacobian_fcn) (const ColumnVector&);
 
   NLFunc (void)
-    {
-      fun = 0;
-      jac = 0;
-    }
+    : fun (0), jac (0) { }
 
   NLFunc (const nonlinear_fcn f)
-    {
-      fun = f;
-      jac = 0;
-    }
+    : fun (f), jac (0) { }
 
   NLFunc (const nonlinear_fcn f, const jacobian_fcn j)
-    {
-      fun = f;
-      jac = j;
-    }
+    : fun (f), jac (j) { }
 
   NLFunc (const NLFunc& a)
-    {
-      fun = a.function ();
-      jac = a.jacobian_function ();
-    }
+    : fun (a.fun), jac (a.jac) { }
 
   NLFunc& operator = (const NLFunc& a)
     {
-      fun = a.function ();
-      jac = a.jacobian_function ();
-
+      if (this != &a)
+	{
+	  fun = a.fun;
+	  jac = a.jac;
+	}
       return *this;
     }
 
+  ~NLFunc (void) { }
+
   nonlinear_fcn function (void) const { return fun; }
 
   NLFunc& set_function (const nonlinear_fcn f)