# HG changeset patch # User jwe # Date 823332531 0 # Node ID 12a94a17509d3367a8698ce0e62128cd608f850d # Parent 46ab6238fa79189b77003133a8dd159a24732740 [project @ 1996-02-03 07:16:15 by jwe] diff -r 46ab6238fa79 -r 12a94a17509d liboctave/LP.h --- a/liboctave/LP.h Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/LP.h Sat Feb 03 07:28:51 1996 +0000 @@ -1,7 +1,7 @@ // LP.h -*- C++ -*- /* -Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. @@ -47,6 +47,24 @@ LP (const ColumnVector& c_arg, const LinConst& l) : base_minimizer (), c (c_arg), lc (l) { } + LP (const LP& a) + : base_minimizer (a), c (a.c), bnds (a.bnds), lc (a.lc) { } + + LP& operator = (const LP& a) + { + if (this != &a) + { + base_minimizer::operator = (a); + + c = a.c; + bnds = a.bnds; + lc = a.lc; + } + return *this; + } + + ~LP (void) { } + protected: ColumnVector c; diff -r 46ab6238fa79 -r 12a94a17509d liboctave/LPsolve.cc --- a/liboctave/LPsolve.cc Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/LPsolve.cc Sat Feb 03 07:28:51 1996 +0000 @@ -31,19 +31,15 @@ #include "LPsolve.h" #include "dColVector.h" +#include "lo-error.h" ColumnVector LPsolve::do_minimize (double&, int&, ColumnVector&) { + (*current_liboctave_error_handler) ("sorry, not implemented"); return ColumnVector (); } -void -LPsolve::set_default_options (void) -{ - // Maybe this isn't needed? -} - /* ;;; Local Variables: *** ;;; mode: C++ *** diff -r 46ab6238fa79 -r 12a94a17509d liboctave/NLP.h --- a/liboctave/NLP.h Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/NLP.h Sat Feb 03 07:28:51 1996 +0000 @@ -65,24 +65,26 @@ const NLConst& nl) : base_minimizer (x), phi (obj), bnds (b), nlc (nl) { } + NLP (const NLP& a) + : base_minimizer (a), phi (a.phi), bnds (a.bnds), lc (a.lc), nlc (a.nlc) + { } + NLP& operator = (const NLP& a) { if (this != &a) { - x = a.x; + base_minimizer::operator = (a); + phi = a.phi; bnds = a.bnds; lc = a.lc; nlc = a.nlc; } - return *this; } virtual ~NLP (void) { } - int size (void) const { return x.capacity (); } - protected: Objective phi; diff -r 46ab6238fa79 -r 12a94a17509d liboctave/NPSOL.cc --- a/liboctave/NPSOL.cc Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/NPSOL.cc Sat Feb 03 07:28:51 1996 +0000 @@ -1,7 +1,7 @@ // NPSOL.cc -*- C++ -*- /* -Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. @@ -308,15 +308,6 @@ return x; } -NPSOL& -NPSOL::option (char *) -{ - cerr << "This function no longer has any effect.\n" - << "Use the NPSOL_option class instead\n"; - - return *this; -} - NPSOL_options::NPSOL_options (void) { init (); diff -r 46ab6238fa79 -r 12a94a17509d liboctave/NPSOL.h --- a/liboctave/NPSOL.h Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/NPSOL.h Sat Feb 03 07:28:51 1996 +0000 @@ -165,8 +165,11 @@ NPSOL& operator = (const NPSOL& a) { - NLP::operator = (a); - NPSOL_options::operator = (a); + if (this != &a) + { + NLP::operator = (a); + NPSOL_options::operator = (a); + } return *this; } diff -r 46ab6238fa79 -r 12a94a17509d liboctave/QPSOL.cc --- a/liboctave/QPSOL.cc Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/QPSOL.cc Sat Feb 03 07:28:51 1996 +0000 @@ -1,7 +1,7 @@ // QPSOL.cc -*- C++ -*- /* -Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. diff -r 46ab6238fa79 -r 12a94a17509d liboctave/QPSOL.h --- a/liboctave/QPSOL.h Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/QPSOL.h Sat Feb 03 07:28:51 1996 +0000 @@ -1,7 +1,7 @@ // QPSOL.h -*- C++ -*- /* -Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. @@ -72,42 +72,44 @@ { public: - QPSOL (void) : QP () { } + QPSOL (void) + : QP (), QPSOL_options () { } - QPSOL (const ColumnVector& x, const Matrix& H) : QP (x, H) { } + QPSOL (const ColumnVector& x, const Matrix& H) + : QP (x, H), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c) - : QP (x, H, c) { } + : QP (x, H, c), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const Bounds& b) - : QP (x, H, b) { } + : QP (x, H, b), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const LinConst& lc) - : QP (x, H, lc) { } + : QP (x, H, lc), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c, - const Bounds& b) : QP (x, H, c, b) { } + const Bounds& b) + : QP (x, H, c, b), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c, - const LinConst& lc) : QP (x, H, c, lc) { } + const LinConst& lc) + : QP (x, H, c, lc), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const Bounds& b, const LinConst& lc) - : QP (x, H, b, lc) { } + : QP (x, H, b, lc), QPSOL_options () { } QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c, - const Bounds& b, const LinConst& lc) : QP (x, H, c, b, lc) { } + const Bounds& b, const LinConst& lc) + : QP (x, H, c, b, lc), QPSOL_options () { } - QPSOL (const QPSOL& a) : QP (a.x, a.H, a.c, a.bnds, a.lc) { } + QPSOL (const QPSOL& a) + : QP (a), QPSOL_options (a) { } QPSOL& operator = (const QPSOL& a) { - x = a.x; - H = a.H; - c = a.c; - bnds = a.bnds; - lc = a.lc; - + QP::operator = (a); + QPSOL_options::operator = (a); return *this; } diff -r 46ab6238fa79 -r 12a94a17509d liboctave/base-min.h --- a/liboctave/base-min.h Sat Feb 03 07:12:52 1996 +0000 +++ b/liboctave/base-min.h Sat Feb 03 07:28:51 1996 +0000 @@ -1,7 +1,7 @@ // base-min.h -*- C++ -*- /* -Copyright (C) 1995 John W. Eaton +Copyright (C) 1996 John W. Eaton This file is part of Octave. @@ -113,6 +113,8 @@ return do_minimize (objf, inform, lambda); } + int size (void) const { return x.capacity (); } + protected: ColumnVector x;