# HG changeset patch # User jwe # Date 777709629 0 # Node ID 21cb3c7dc9e39d444870f90f10bbbc072c285658 # Parent 3a7c78b38ca3b476589b05ee68b76036e6a70271 [project @ 1994-08-24 06:19:54 by jwe] diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/Array.cc --- a/liboctave/Array.cc Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/Array.cc Wed Aug 24 06:27:09 1994 +0000 @@ -830,7 +830,7 @@ return nc; } -#if defined (_AIX) +#if defined (_AIX) && defined (__GNUG__) && __GNUC__ > 1 && __GNUC_MINOR__ < 6 template T& DiagArray::elem (int r, int c) diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/Array.h --- a/liboctave/Array.h Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/Array.h Wed Aug 24 06:27:09 1994 +0000 @@ -237,13 +237,13 @@ inline T get (int i) { return Array::elem (i); } inline void set (const T& val, int i) { Array::elem (i) = val; } -#if ! defined (_AIX) +#if ! (defined (_AIX) && defined (__GNUG__) && __GNUC__ > 1 && __GNUC_MINOR__ < 6) class Proxy { public: inline Proxy (DiagArray *ref, int r, int c) - : object (ref), i (r), j (c) { } + : i (r), j (c), object (ref) { } inline const Proxy& operator = (const T& val) const { @@ -314,7 +314,7 @@ int cols (void) const; int columns (void) const; -#if defined (_AIX) +#if defined (_AIX) && defined (__GNUG__) && __GNUC__ > 1 && __GNUC_MINOR__ < 6 T& elem (int r, int c); T& checkelem (int r, int c); T& operator () (int r, int c); diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/FSQP.h --- a/liboctave/FSQP.h Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/FSQP.h Wed Aug 24 06:27:09 1994 +0000 @@ -24,12 +24,12 @@ #if !defined (octave_FSQP_h) #define octave_FSQP_h 1 +#ifndef FSQP_MISSING + #if defined (__GNUG__) #pragma interface #endif -#ifndef FSQP_MISSING - #include "NLP.h" extern "C++" { @@ -44,9 +44,9 @@ private: }; -#endif /* FSQP_MISSING */ +} // extern "C++" -} // extern "C++" +#endif /* FSQP_MISSING */ #endif diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/NLEqn.cc --- a/liboctave/NLEqn.cc Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/NLEqn.cc Wed Aug 24 06:27:09 1994 +0000 @@ -61,12 +61,12 @@ // Constructors -NLEqn::NLEqn (void) : NLFunc (), x (), n (0) {} +NLEqn::NLEqn (void) : NLFunc (), n (0), x () { } NLEqn::NLEqn (const Vector& xvec, const NLFunc f) - : NLFunc (f), x (xvec), n (xvec.capacity ()) {} + : NLFunc (f), n (xvec.capacity ()), x (xvec) { } -NLEqn::NLEqn (const NLEqn& a) : NLFunc (a.fun, a.jac), x (a.x), n (a.n) {} +NLEqn::NLEqn (const NLEqn& a) : NLFunc (a.fun, a.jac), n (a.n), x (a.x) { } void NLEqn::resize (int nn) diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/NPSOL.h --- a/liboctave/NPSOL.h Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/NPSOL.h Wed Aug 24 06:27:09 1994 +0000 @@ -24,12 +24,12 @@ #if !defined (octave_NPSOL_h) #define octave_NPSOL_h 1 +#ifndef NPSOL_MISSING + #if defined (__GNUG__) #pragma interface #endif -#ifndef NPSOL_MISSING - #include "dColVector.h" #include "NLP.h" @@ -192,9 +192,9 @@ inline NPSOL::NPSOL (const NPSOL& a) : NLP (a.x, a.phi, a.bnds, a.lc, a.nlc) { } -#endif /* NPSOL_MISSING */ +} // extern "C++" -} // extern "C++" +#endif /* NPSOL_MISSING */ #endif diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/QPSOL.h --- a/liboctave/QPSOL.h Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/QPSOL.h Wed Aug 24 06:27:09 1994 +0000 @@ -24,12 +24,12 @@ #if !defined (octave_QPSOL_h) #define octave_QPSOL_h 1 +#ifndef QPSOL_MISSING + #if defined (__GNUG__) #pragma interface #endif -#ifndef QPSOL_MISSING - #include "dMatrix.h" #include "dColVector.h" #include "QP.h" @@ -127,9 +127,9 @@ return *this; } -#endif /* QPSOL_MISSING */ +} // extern "C++" -} // extern "C++" +#endif /* QPSOL_MISSING */ #endif diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/Range.cc --- a/liboctave/Range.cc Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/Range.cc Wed Aug 24 06:27:09 1994 +0000 @@ -33,6 +33,24 @@ #include #include "Range.h" +#include "dMatrix.h" + +Matrix +Range::matrix_value (void) const +{ + Matrix retval; + + if (rng_nelem > 0) + { + retval.resize (1, rng_nelem); + double b = rng_base; + double increment = rng_inc; + for (int i = 0; i < rng_nelem; i++) + retval.elem (0, i) = b + i * increment; + } + + return retval; +} // NOTE: max and min only return useful values if nelem > 0. diff -r 3a7c78b38ca3 -r 21cb3c7dc9e3 liboctave/Range.h --- a/liboctave/Range.h Wed Aug 24 05:19:47 1994 +0000 +++ b/liboctave/Range.h Wed Aug 24 06:27:09 1994 +0000 @@ -32,6 +32,7 @@ class istream; class ostream; +class Matrix; class Range { @@ -46,6 +47,8 @@ double inc (void) const; int nelem (void) const; + Matrix matrix_value (void) const; + double min (void) const; double max (void) const;