Mercurial > octave
diff liboctave/dRowVector.h @ 1205:8302fab9fe24
[project @ 1995-04-04 02:05:01 by jwe]
author | jwe |
---|---|
date | Tue, 04 Apr 1995 02:05:01 +0000 |
parents | c01e881ccbb1 |
children | 0bf4d2b7def4 |
line wrap: on
line diff
--- a/liboctave/dRowVector.h Tue Apr 04 01:42:14 1995 +0000 +++ b/liboctave/dRowVector.h Tue Apr 04 02:05:01 1995 +0000 @@ -33,7 +33,6 @@ class RowVector : public Array<double> { friend class ColumnVector; -friend class ComplexRowVector; public: @@ -42,7 +41,6 @@ RowVector (int n, double val) : Array<double> (n, val) { } RowVector (const Array<double>& a) : Array<double> (a) { } RowVector (const RowVector& a) : Array<double> (a) { } -// RowVector (double a) : Array<double> (1, a) { } RowVector& operator = (const RowVector& a) { @@ -50,8 +48,6 @@ return *this; } -// operator Array<double>& () const { return *this; } - int operator == (const RowVector& a) const; int operator != (const RowVector& a) const; @@ -66,6 +62,9 @@ ColumnVector transpose (void) const; + friend RowVector real (const ComplexRowVector& a); + friend RowVector imag (const ComplexRowVector& a); + // resize is the destructive equivalent for this one RowVector extract (int c1, int c2) const; @@ -75,48 +74,14 @@ RowVector& operator += (const RowVector& a); RowVector& operator -= (const RowVector& a); -// row vector by scalar -> row vector operations - - friend ComplexRowVector operator + (const RowVector& a, const Complex& s); - friend ComplexRowVector operator - (const RowVector& a, const Complex& s); - friend ComplexRowVector operator * (const RowVector& a, const Complex& s); - friend ComplexRowVector operator / (const RowVector& a, const Complex& s); - -// scalar by row vector -> row vector operations - - friend ComplexRowVector operator + (const Complex& s, const RowVector& a); - friend ComplexRowVector operator - (const Complex& s, const RowVector& a); - friend ComplexRowVector operator * (const Complex& s, const RowVector& a); - friend ComplexRowVector operator / (const Complex& s, const RowVector& a); - -// row vector by column vector -> scalar - - friend double operator * (const RowVector& a, const ColumnVector& b); - - friend Complex operator * (const RowVector& a, const ComplexColumnVector& b); - // row vector by matrix -> row vector friend RowVector operator * (const RowVector& a, const Matrix& b); - friend ComplexRowVector operator * (const RowVector& a, - const ComplexMatrix& b); - -// row vector by row vector -> row vector operations - - friend ComplexRowVector operator + (const RowVector& a, - const ComplexRowVector& b); - friend ComplexRowVector operator - (const RowVector& a, - const ComplexRowVector& b); - - friend ComplexRowVector product (const RowVector& a, - const ComplexRowVector& b); - friend ComplexRowVector quotient (const RowVector& a, - const ComplexRowVector& b); - // other operations friend RowVector map (d_d_Mapper f, const RowVector& a); + friend RowVector map (d_c_Mapper f, const ComplexRowVector& a); void map (d_d_Mapper f); double min (void) const; @@ -140,6 +105,14 @@ RowVector (double *d, int l) : Array<double> (d, l) { } }; +// row vector by column vector -> scalar + +double operator * (const RowVector& a, const ColumnVector& b); + +Complex operator * (const RowVector& a, const ComplexColumnVector& b); + +// other operations + RowVector linspace (double x1, double x2, int n); } // extern "C++"