Mercurial > hg > octave-lojdl
changeset 1214:0bf4d2b7def4
[project @ 1995-04-06 02:33:59 by jwe]
author | jwe |
---|---|
date | Thu, 06 Apr 1995 02:35:53 +0000 |
parents | 9689615b34f2 |
children | c56c0565afd5 |
files | liboctave/CColVector.cc liboctave/CColVector.h liboctave/CDiagMatrix.cc liboctave/CDiagMatrix.h liboctave/CMatrix.cc liboctave/CMatrix.h liboctave/CRowVector.cc liboctave/CRowVector.h liboctave/Makefile.in liboctave/dColVector.cc liboctave/dColVector.h liboctave/dDiagMatrix.cc liboctave/dDiagMatrix.h liboctave/dMatrix.cc liboctave/dMatrix.h liboctave/dRowVector.cc liboctave/dRowVector.h |
diffstat | 17 files changed, 95 insertions(+), 227 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CColVector.cc +++ b/liboctave/CColVector.cc @@ -48,16 +48,8 @@ * Complex Column Vector class */ -#define KLUDGE_VECTORS -#define TYPE Complex -#define KL_VEC_TYPE ComplexColumnVector -#include "mx-kludge.cc" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - ComplexColumnVector::ComplexColumnVector (const ColumnVector& a) - : Array<Complex> (a.length ()) + : MArray<Complex> (a.length ()) { for (int i = 0; i < length (); i++) elem (i) = a.elem (i);
--- a/liboctave/CColVector.h +++ b/liboctave/CColVector.h @@ -24,34 +24,32 @@ #if !defined (octave_ComplexColumnVector_h) #define octave_ComplexColumnVector_h 1 -#include "Array.h" +#include "MArray.h" #include "mx-defs.h" extern "C++" { -class ComplexColumnVector : public Array<Complex> +class ComplexColumnVector : public MArray<Complex> { friend class ComplexMatrix; friend class ComplexRowVector; public: - ComplexColumnVector (void) : Array<Complex> () { } - ComplexColumnVector (int n) : Array<Complex> (n) { } - ComplexColumnVector (int n, const Complex& val) : Array<Complex> (n, val) { } + ComplexColumnVector (void) : MArray<Complex> () { } + ComplexColumnVector (int n) : MArray<Complex> (n) { } + ComplexColumnVector (int n, const Complex& val) : MArray<Complex> (n, val) { } ComplexColumnVector (const ColumnVector& a); - ComplexColumnVector (const Array<Complex>& a) : Array<Complex> (a) { } - ComplexColumnVector (const ComplexColumnVector& a) : Array<Complex> (a) { } + ComplexColumnVector (const MArray<Complex>& a) : MArray<Complex> (a) { } + ComplexColumnVector (const ComplexColumnVector& a) : MArray<Complex> (a) { } ComplexColumnVector& operator = (const ComplexColumnVector& a) { - Array<Complex>::operator = (a); + MArray<Complex>::operator = (a); return *this; } -// operator Array<Complex>& () const { return *this; } - int operator == (const ComplexColumnVector& a) const; int operator != (const ComplexColumnVector& a) const; @@ -184,17 +182,9 @@ friend ostream& operator << (ostream& os, const ComplexColumnVector& a); friend istream& operator >> (istream& is, ComplexColumnVector& a); -#define KLUDGE_VECTORS -#define TYPE Complex -#define KL_VEC_TYPE ComplexColumnVector -#include "mx-kludge.h" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - private: - ComplexColumnVector (Complex *d, int l) : Array<Complex> (d, l) { } + ComplexColumnVector (Complex *d, int l) : MArray<Complex> (d, l) { } }; } // extern "C++"
--- a/liboctave/CDiagMatrix.cc +++ b/liboctave/CDiagMatrix.cc @@ -37,30 +37,22 @@ * Complex Diagonal Matrix class */ -#define KLUDGE_DIAG_MATRICES -#define TYPE Complex -#define KL_DMAT_TYPE ComplexDiagMatrix -#include "mx-kludge.cc" -#undef KLUDGE_DIAG_MATRICES -#undef TYPE -#undef KL_DMAT_TYPE - ComplexDiagMatrix::ComplexDiagMatrix (const RowVector& a) - : DiagArray<Complex> (a.length ()) + : MDiagArray<Complex> (a.length ()) { for (int i = 0; i < length (); i++) elem (i, i) = a.elem (i); } ComplexDiagMatrix::ComplexDiagMatrix (const ColumnVector& a) - : DiagArray<Complex> (a.length ()) + : MDiagArray<Complex> (a.length ()) { for (int i = 0; i < length (); i++) elem (i, i) = a.elem (i); } ComplexDiagMatrix::ComplexDiagMatrix (const DiagMatrix& a) - : DiagArray<Complex> (a.rows (), a.cols ()) + : MDiagArray<Complex> (a.rows (), a.cols ()) { for (int i = 0; i < length (); i++) elem (i, i) = a.elem (i, i);
--- a/liboctave/CDiagMatrix.h +++ b/liboctave/CDiagMatrix.h @@ -24,7 +24,7 @@ #if !defined (octave_ComplexDiagMatrix_h) #define octave_ComplexDiagMatrix_h 1 -#include "Array.h" +#include "MArray.h" #include "dRowVector.h" #include "CRowVector.h" @@ -35,30 +35,30 @@ extern "C++" { -class ComplexDiagMatrix : public DiagArray<Complex> +class ComplexDiagMatrix : public MDiagArray<Complex> { public: - ComplexDiagMatrix (void) : DiagArray<Complex> () { } - ComplexDiagMatrix (int n) : DiagArray<Complex> (n) { } + ComplexDiagMatrix (void) : MDiagArray<Complex> () { } + ComplexDiagMatrix (int n) : MDiagArray<Complex> (n) { } ComplexDiagMatrix (int n, const Complex& val) - : DiagArray<Complex> (n, val) { } - ComplexDiagMatrix (int r, int c) : DiagArray<Complex> (r, c) { } + : MDiagArray<Complex> (n, val) { } + ComplexDiagMatrix (int r, int c) : MDiagArray<Complex> (r, c) { } ComplexDiagMatrix (int r, int c, const Complex& val) - : DiagArray<Complex> (r, c, val) { } + : MDiagArray<Complex> (r, c, val) { } ComplexDiagMatrix (const RowVector& a); - ComplexDiagMatrix (const ComplexRowVector& a) : DiagArray<Complex> (a) { } + ComplexDiagMatrix (const ComplexRowVector& a) : MDiagArray<Complex> (a) { } ComplexDiagMatrix (const ColumnVector& a); ComplexDiagMatrix (const ComplexColumnVector& a) - : DiagArray<Complex> (a) { } + : MDiagArray<Complex> (a) { } ComplexDiagMatrix (const DiagMatrix& a); - ComplexDiagMatrix (const DiagArray<Complex>& a) - : DiagArray<Complex> (a) { } - ComplexDiagMatrix (const ComplexDiagMatrix& a) : DiagArray<Complex> (a) { } + ComplexDiagMatrix (const MDiagArray<Complex>& a) + : MDiagArray<Complex> (a) { } + ComplexDiagMatrix (const ComplexDiagMatrix& a) : MDiagArray<Complex> (a) { } ComplexDiagMatrix& operator = (const ComplexDiagMatrix& a) { - DiagArray<Complex>::operator = (a); + MDiagArray<Complex>::operator = (a); return *this; } @@ -154,18 +154,10 @@ friend ostream& operator << (ostream& os, const ComplexDiagMatrix& a); -#define KLUDGE_DIAG_MATRICES -#define TYPE Complex -#define KL_DMAT_TYPE ComplexDiagMatrix -#include "mx-kludge.h" -#undef KLUDGE_DIAG_MATRICES -#undef TYPE -#undef KL_DMAT_TYPE - private: ComplexDiagMatrix (Complex *d, int nr, int nc) - : DiagArray<Complex> (d, nr, nc) { } + : MDiagArray<Complex> (d, nr, nc) { } }; } // extern "C++"
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -74,20 +74,12 @@ int F77_FCN (cfftb) (const int*, Complex*, Complex*); } -#define KLUDGE_MATRICES -#define TYPE Complex -#define KL_MAT_TYPE ComplexMatrix -#include "mx-kludge.cc" -#undef KLUDGE_MATRICES -#undef TYPE -#undef KL_MAT_TYPE - /* * Complex Matrix class */ ComplexMatrix::ComplexMatrix (const Matrix& a) - : Array2<Complex> (a.rows (), a.cols ()) + : MArray2<Complex> (a.rows (), a.cols ()) { for (int j = 0; j < cols (); j++) for (int i = 0; i < rows (); i++) @@ -95,14 +87,14 @@ } ComplexMatrix::ComplexMatrix (const DiagMatrix& a) - : Array2<Complex> (a.rows (), a.cols (), 0.0) + : MArray2<Complex> (a.rows (), a.cols (), 0.0) { for (int i = 0; i < a.length (); i++) elem (i, i) = a.elem (i, i); } ComplexMatrix::ComplexMatrix (const ComplexDiagMatrix& a) - : Array2<Complex> (a.rows (), a.cols (), 0.0) + : MArray2<Complex> (a.rows (), a.cols (), 0.0) { for (int i = 0; i < a.length (); i++) elem (i, i) = a.elem (i, i);
--- a/liboctave/CMatrix.h +++ b/liboctave/CMatrix.h @@ -26,13 +26,13 @@ #include <Complex.h> -#include "Array.h" +#include "MArray.h" #include "mx-defs.h" extern "C++" { -class ComplexMatrix : public Array2<Complex> +class ComplexMatrix : public MArray2<Complex> { friend class Matrix; friend class ComplexCHOL; @@ -45,20 +45,20 @@ public: - ComplexMatrix (void) : Array2<Complex> () { } - ComplexMatrix (int r, int c) : Array2<Complex> (r, c) { } + ComplexMatrix (void) : MArray2<Complex> () { } + ComplexMatrix (int r, int c) : MArray2<Complex> (r, c) { } ComplexMatrix (int r, int c, const Complex& val) - : Array2<Complex> (r, c, val) { } + : MArray2<Complex> (r, c, val) { } ComplexMatrix (const Matrix& a); - ComplexMatrix (const Array2<Complex>& a) : Array2<Complex> (a) { } - ComplexMatrix (const ComplexMatrix& a) : Array2<Complex> (a) { } + ComplexMatrix (const MArray2<Complex>& a) : MArray2<Complex> (a) { } + ComplexMatrix (const ComplexMatrix& a) : MArray2<Complex> (a) { } ComplexMatrix (const DiagMatrix& a); - ComplexMatrix (const DiagArray<Complex>& a) : Array2<Complex> (a) { } + ComplexMatrix (const MDiagArray<Complex>& a) : MArray2<Complex> (a) { } ComplexMatrix (const ComplexDiagMatrix& a); ComplexMatrix& operator = (const ComplexMatrix& a) { - Array2<Complex>::operator = (a); + MArray2<Complex>::operator = (a); return *this; } @@ -340,17 +340,9 @@ friend ostream& operator << (ostream& os, const ComplexMatrix& a); friend istream& operator >> (istream& is, ComplexMatrix& a); -#define KLUDGE_MATRICES -#define TYPE Complex -#define KL_MAT_TYPE ComplexMatrix -#include "mx-kludge.h" -#undef KLUDGE_MATRICES -#undef TYPE -#undef KL_MAT_TYPE - private: - ComplexMatrix (Complex *d, int r, int c) : Array2<Complex> (d, r, c) { } + ComplexMatrix (Complex *d, int r, int c) : MArray2<Complex> (d, r, c) { } }; } // extern "C++"
--- a/liboctave/CRowVector.cc +++ b/liboctave/CRowVector.cc @@ -48,16 +48,8 @@ * Complex Row Vector class */ -#define KLUDGE_VECTORS -#define TYPE Complex -#define KL_VEC_TYPE ComplexRowVector -#include "mx-kludge.cc" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - ComplexRowVector::ComplexRowVector (const RowVector& a) - : Array<Complex> (a.length ()) + : MArray<Complex> (a.length ()) { for (int i = 0; i < length (); i++) elem (i) = a.elem (i);
--- a/liboctave/CRowVector.h +++ b/liboctave/CRowVector.h @@ -24,28 +24,28 @@ #if !defined (octave_ComplexRowVector_h) #define octave_ComplexRowVector_h 1 -#include "Array.h" +#include "MArray.h" #include "mx-defs.h" extern "C++" { -class ComplexRowVector : public Array<Complex> +class ComplexRowVector : public MArray<Complex> { friend class ComplexColumnVector; public: - ComplexRowVector (void) : Array<Complex> () { } - ComplexRowVector (int n) : Array<Complex> (n) { } - ComplexRowVector (int n, const Complex& val) : Array<Complex> (n, val) { } + ComplexRowVector (void) : MArray<Complex> () { } + ComplexRowVector (int n) : MArray<Complex> (n) { } + ComplexRowVector (int n, const Complex& val) : MArray<Complex> (n, val) { } ComplexRowVector (const RowVector& a); - ComplexRowVector (const Array<Complex>& a) : Array<Complex> (a) { } - ComplexRowVector (const ComplexRowVector& a) : Array<Complex> (a) { } + ComplexRowVector (const MArray<Complex>& a) : MArray<Complex> (a) { } + ComplexRowVector (const ComplexRowVector& a) : MArray<Complex> (a) { } ComplexRowVector& operator = (const ComplexRowVector& a) { - Array<Complex>::operator = (a); + MArray<Complex>::operator = (a); return *this; } @@ -149,17 +149,9 @@ friend ostream& operator << (ostream& os, const ComplexRowVector& a); friend istream& operator >> (istream& is, ComplexRowVector& a); -#define KLUDGE_VECTORS -#define TYPE Complex -#define KL_VEC_TYPE ComplexRowVector -#include "mx-kludge.h" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - private: - ComplexRowVector (Complex *d, int l) : Array<Complex> (d, l) { } + ComplexRowVector (Complex *d, int l) : MArray<Complex> (d, l) { } }; // row vector by column vector -> scalar
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -19,7 +19,7 @@ INSTALL_DATA = @INSTALL_DATA@ MATRIX_INC = Array.h MArray.h Matrix.h mx-base.h mx-defs.h mx-ext.h \ - mx-kludge.h CColVector.h CDiagMatrix.h CMatrix.h CRowVector.h \ + CColVector.h CDiagMatrix.h CMatrix.h CRowVector.h \ CmplxAEPBAL.h CmplxCHOL.h CmplxDET.h CmplxHESS.h CmplxLU.h \ CmplxQR.h CmplxQRP.h CmplxSCHUR.h CmplxSVD.h EIG.h \ dColVector.h dDiagMatrix.h dMatrix.h dRowVector.h dbleAEPBAL.h \ @@ -49,7 +49,7 @@ Quad.cc Range.cc lo-error.cc sun-utils.cc $(TEMPLATE_SRC) \ $(TI_SRC) $(MATRIX_SRC) -EXTRAS = mx-kludge.cc mx-inlines.cc +EXTRAS = mx-inlines.cc DISTFILES = Makefile.in $(SOURCES) $(INCLUDES) $(EXTRAS)
--- a/liboctave/dColVector.cc +++ b/liboctave/dColVector.cc @@ -48,14 +48,6 @@ * Column Vector class. */ -#define KLUDGE_VECTORS -#define TYPE double -#define KL_VEC_TYPE ColumnVector -#include "mx-kludge.cc" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - int ColumnVector::operator == (const ColumnVector& a) const {
--- a/liboctave/dColVector.h +++ b/liboctave/dColVector.h @@ -24,28 +24,28 @@ #if !defined (octave_ColumnVector_h) #define octave_ColumnVector_h 1 -#include "Array.h" +#include "MArray.h" #include "mx-defs.h" extern "C++" { -class ColumnVector : public Array<double> +class ColumnVector : public MArray<double> { friend class Matrix; friend class RowVector; public: - ColumnVector (void) : Array<double> () { } - ColumnVector (int n) : Array<double> (n) { } - ColumnVector (int n, double val) : Array<double> (n, val) { } - ColumnVector (const Array<double>& a) : Array<double> (a) { } - ColumnVector (const ColumnVector& a) : Array<double> (a) { } + ColumnVector (void) : MArray<double> () { } + ColumnVector (int n) : MArray<double> (n) { } + ColumnVector (int n, double val) : MArray<double> (n, val) { } + ColumnVector (const MArray<double>& a) : MArray<double> (a) { } + ColumnVector (const ColumnVector& a) : MArray<double> (a) { } ColumnVector& operator = (const ColumnVector& a) { - Array<double>::operator = (a); + MArray<double>::operator = (a); return *this; } @@ -97,17 +97,9 @@ friend ostream& operator << (ostream& os, const ColumnVector& a); friend istream& operator >> (istream& is, ColumnVector& a); -#define KLUDGE_VECTORS -#define TYPE double -#define KL_VEC_TYPE ColumnVector -#include "mx-kludge.h" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - private: - ColumnVector (double *d, int l) : Array<double> (d, l) { } + ColumnVector (double *d, int l) : MArray<double> (d, l) { } }; } // extern "C++"
--- a/liboctave/dDiagMatrix.cc +++ b/liboctave/dDiagMatrix.cc @@ -37,14 +37,6 @@ * Diagonal Matrix class. */ -#define KLUDGE_DIAG_MATRICES -#define TYPE double -#define KL_DMAT_TYPE DiagMatrix -#include "mx-kludge.cc" -#undef KLUDGE_DIAG_MATRICES -#undef TYPE -#undef KL_DMAT_TYPE - int DiagMatrix::operator == (const DiagMatrix& a) const {
--- a/liboctave/dDiagMatrix.h +++ b/liboctave/dDiagMatrix.h @@ -24,7 +24,7 @@ #if !defined (octave_DiagMatrix_h) #define octave_DiagMatrix_h 1 -#include "Array.h" +#include "MArray.h" #include "dRowVector.h" #include "dColVector.h" @@ -33,32 +33,30 @@ extern "C++" { -class DiagMatrix : public DiagArray<double> +class DiagMatrix : public MDiagArray<double> { friend class SVD; friend class ComplexSVD; public: - DiagMatrix (void) : DiagArray<double> () { } - DiagMatrix (int n) : DiagArray<double> (n) { } - DiagMatrix (int n, double val) : DiagArray<double> (n, val) { } - DiagMatrix (int r, int c) : DiagArray<double> (r, c) { } - DiagMatrix (int r, int c, double val) : DiagArray<double> (r, c, val) { } - DiagMatrix (const RowVector& a) : DiagArray<double> (a) { } - DiagMatrix (const ColumnVector& a) : DiagArray<double> (a) { } - DiagMatrix (const DiagArray<double>& a) : DiagArray<double> (a) { } - DiagMatrix (const DiagMatrix& a) : DiagArray<double> (a) { } -// DiagMatrix (double a) : DiagArray<double> (1, a) { } + DiagMatrix (void) : MDiagArray<double> () { } + DiagMatrix (int n) : MDiagArray<double> (n) { } + DiagMatrix (int n, double val) : MDiagArray<double> (n, val) { } + DiagMatrix (int r, int c) : MDiagArray<double> (r, c) { } + DiagMatrix (int r, int c, double val) : MDiagArray<double> (r, c, val) { } + DiagMatrix (const RowVector& a) : MDiagArray<double> (a) { } + DiagMatrix (const ColumnVector& a) : MDiagArray<double> (a) { } + DiagMatrix (const MDiagArray<double>& a) : MDiagArray<double> (a) { } + DiagMatrix (const DiagMatrix& a) : MDiagArray<double> (a) { } +// DiagMatrix (double a) : MDiagArray<double> (1, a) { } DiagMatrix& operator = (const DiagMatrix& a) { - DiagArray<double>::operator = (a); + MDiagArray<double>::operator = (a); return *this; } -// operator DiagArray<double>& () const { return *this; } - int operator == (const DiagMatrix& a) const; int operator != (const DiagMatrix& a) const; @@ -108,17 +106,9 @@ friend ostream& operator << (ostream& os, const DiagMatrix& a); -#define KLUDGE_DIAG_MATRICES -#define TYPE double -#define KL_DMAT_TYPE DiagMatrix -#include "mx-kludge.h" -#undef KLUDGE_DIAG_MATRICES -#undef TYPE -#undef KL_DMAT_TYPE - private: - DiagMatrix (double *d, int nr, int nc) : DiagArray<double> (d, nr, nc) { } + DiagMatrix (double *d, int nr, int nc) : MDiagArray<double> (d, nr, nc) { } }; } // extern "C++"
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -75,20 +75,12 @@ int F77_FCN (cfftb) (const int*, Complex*, Complex*); } -#define KLUDGE_MATRICES -#define TYPE double -#define KL_MAT_TYPE Matrix -#include "mx-kludge.cc" -#undef KLUDGE_MATRICES -#undef TYPE -#undef KL_MAT_TYPE - /* * Matrix class. */ Matrix::Matrix (const DiagMatrix& a) - : Array2<double> (a.rows (), a.cols (), 0.0) + : MArray2<double> (a.rows (), a.cols (), 0.0) { for (int i = 0; i < a.length (); i++) elem (i, i) = a.elem (i, i);
--- a/liboctave/dMatrix.h +++ b/liboctave/dMatrix.h @@ -27,13 +27,13 @@ // For FILE... #include <stdio.h> -#include "Array.h" +#include "MArray.h" #include "mx-defs.h" extern "C++" { -class Matrix : public Array2<double> +class Matrix : public MArray2<double> { friend class ComplexMatrix; friend class AEPBAL; @@ -48,17 +48,17 @@ public: - Matrix (void) : Array2<double> () { } - Matrix (int r, int c) : Array2<double> (r, c) { } - Matrix (int r, int c, double val) : Array2<double> (r, c, val) { } - Matrix (const Array2<double>& a) : Array2<double> (a) { } - Matrix (const Matrix& a) : Array2<double> (a) { } - Matrix (const DiagArray<double>& a) : Array2<double> (a) { } + Matrix (void) : MArray2<double> () { } + Matrix (int r, int c) : MArray2<double> (r, c) { } + Matrix (int r, int c, double val) : MArray2<double> (r, c, val) { } + Matrix (const MArray2<double>& a) : MArray2<double> (a) { } + Matrix (const Matrix& a) : MArray2<double> (a) { } + Matrix (const MDiagArray<double>& a) : MArray2<double> (a) { } Matrix (const DiagMatrix& a); Matrix& operator = (const Matrix& a) { - Array2<double>::operator = (a); + MArray2<double>::operator = (a); return *this; } @@ -233,17 +233,9 @@ // Until templates really work with g++: -#define KLUDGE_MATRICES -#define TYPE double -#define KL_MAT_TYPE Matrix -#include "mx-kludge.h" -#undef KLUDGE_MATRICES -#undef TYPE -#undef KL_MAT_TYPE - private: - Matrix (double *d, int r, int c) : Array2<double> (d, r, c) { } + Matrix (double *d, int r, int c) : MArray2<double> (d, r, c) { } }; } // extern "C++"
--- a/liboctave/dRowVector.cc +++ b/liboctave/dRowVector.cc @@ -51,14 +51,6 @@ * Row Vector class. */ -#define KLUDGE_VECTORS -#define TYPE double -#define KL_VEC_TYPE RowVector -#include "mx-kludge.cc" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - int RowVector::operator == (const RowVector& a) const {
--- a/liboctave/dRowVector.h +++ b/liboctave/dRowVector.h @@ -24,27 +24,27 @@ #if !defined (octave_RowVector_h) #define octave_RowVector_h 1 -#include "Array.h" +#include "MArray.h" #include "mx-defs.h" extern "C++" { -class RowVector : public Array<double> +class RowVector : public MArray<double> { friend class ColumnVector; public: - RowVector (void) : Array<double> () { } - RowVector (int n) : Array<double> (n) { } - 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 (void) : MArray<double> () { } + RowVector (int n) : MArray<double> (n) { } + RowVector (int n, double val) : MArray<double> (n, val) { } + RowVector (const MArray<double>& a) : MArray<double> (a) { } + RowVector (const RowVector& a) : MArray<double> (a) { } RowVector& operator = (const RowVector& a) { - Array<double>::operator = (a); + MArray<double>::operator = (a); return *this; } @@ -92,17 +92,9 @@ friend ostream& operator << (ostream& os, const RowVector& a); friend istream& operator >> (istream& is, RowVector& a); -#define KLUDGE_VECTORS -#define TYPE double -#define KL_VEC_TYPE RowVector -#include "mx-kludge.h" -#undef KLUDGE_VECTORS -#undef TYPE -#undef KL_VEC_TYPE - private: - RowVector (double *d, int l) : Array<double> (d, l) { } + RowVector (double *d, int l) : MArray<double> (d, l) { } }; // row vector by column vector -> scalar