Mercurial > hg > octave-max
changeset 1878:aa2bcaefbc5a
[project @ 1996-02-05 16:21:31 by jwe]
author | jwe |
---|---|
date | Mon, 05 Feb 1996 16:21:53 +0000 |
parents | 6f70b6929cc1 |
children | 1b43d3c06c04 |
files | liboctave/Bounds.cc liboctave/NLEqn.cc |
diffstat | 2 files changed, 4 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Bounds.cc +++ b/liboctave/Bounds.cc @@ -51,7 +51,6 @@ return *this; } - nb = l.capacity (); lb = l; ub = u; @@ -61,7 +60,7 @@ Bounds& Bounds::set_lower_bounds (const ColumnVector l) { - if (nb != l.capacity ()) + if (ub.capacity () != l.capacity ()) { error ("inconsistent size for lower bounds"); return *this; @@ -75,7 +74,7 @@ Bounds& Bounds::set_upper_bounds (const ColumnVector u) { - if (nb != u.capacity ()) + if (lb.capacity () != u.capacity ()) { error ("inconsistent size for upper bounds"); return *this;
--- a/liboctave/NLEqn.cc +++ b/liboctave/NLEqn.cc @@ -59,18 +59,6 @@ (*current_liboctave_error_handler) ("fatal NLEqn error: %s", msg); } -void -NLEqn::set_states (const ColumnVector& xvec) -{ - if (xvec.capacity () != n) - { - error ("dimension error"); - return; - } - - x = xvec; -} - // Other operations int @@ -146,6 +134,8 @@ { ColumnVector retval; + int n = x.capacity (); + if (n == 0) { error ("equation set not initialized");