Mercurial > octave
comparison liboctave/dMatrix.h @ 1214:0bf4d2b7def4
[project @ 1995-04-06 02:33:59 by jwe]
author | jwe |
---|---|
date | Thu, 06 Apr 1995 02:35:53 +0000 |
parents | 8302fab9fe24 |
children | f93b7fa5e113 |
comparison
equal
deleted
inserted
replaced
1213:9689615b34f2 | 1214:0bf4d2b7def4 |
---|---|
25 #define octave_Matrix_int_h 1 | 25 #define octave_Matrix_int_h 1 |
26 | 26 |
27 // For FILE... | 27 // For FILE... |
28 #include <stdio.h> | 28 #include <stdio.h> |
29 | 29 |
30 #include "Array.h" | 30 #include "MArray.h" |
31 | 31 |
32 #include "mx-defs.h" | 32 #include "mx-defs.h" |
33 | 33 |
34 extern "C++" { | 34 extern "C++" { |
35 | 35 |
36 class Matrix : public Array2<double> | 36 class Matrix : public MArray2<double> |
37 { | 37 { |
38 friend class ComplexMatrix; | 38 friend class ComplexMatrix; |
39 friend class AEPBAL; | 39 friend class AEPBAL; |
40 friend class CHOL; | 40 friend class CHOL; |
41 friend class GEPBAL; | 41 friend class GEPBAL; |
46 friend class SCHUR; | 46 friend class SCHUR; |
47 friend class SVD; | 47 friend class SVD; |
48 | 48 |
49 public: | 49 public: |
50 | 50 |
51 Matrix (void) : Array2<double> () { } | 51 Matrix (void) : MArray2<double> () { } |
52 Matrix (int r, int c) : Array2<double> (r, c) { } | 52 Matrix (int r, int c) : MArray2<double> (r, c) { } |
53 Matrix (int r, int c, double val) : Array2<double> (r, c, val) { } | 53 Matrix (int r, int c, double val) : MArray2<double> (r, c, val) { } |
54 Matrix (const Array2<double>& a) : Array2<double> (a) { } | 54 Matrix (const MArray2<double>& a) : MArray2<double> (a) { } |
55 Matrix (const Matrix& a) : Array2<double> (a) { } | 55 Matrix (const Matrix& a) : MArray2<double> (a) { } |
56 Matrix (const DiagArray<double>& a) : Array2<double> (a) { } | 56 Matrix (const MDiagArray<double>& a) : MArray2<double> (a) { } |
57 Matrix (const DiagMatrix& a); | 57 Matrix (const DiagMatrix& a); |
58 | 58 |
59 Matrix& operator = (const Matrix& a) | 59 Matrix& operator = (const Matrix& a) |
60 { | 60 { |
61 Array2<double>::operator = (a); | 61 MArray2<double>::operator = (a); |
62 return *this; | 62 return *this; |
63 } | 63 } |
64 | 64 |
65 int operator == (const Matrix& a) const; | 65 int operator == (const Matrix& a) const; |
66 int operator != (const Matrix& a) const; | 66 int operator != (const Matrix& a) const; |
231 int read (FILE *fptr, char *type); | 231 int read (FILE *fptr, char *type); |
232 int write (FILE *fptr, char *type); | 232 int write (FILE *fptr, char *type); |
233 | 233 |
234 // Until templates really work with g++: | 234 // Until templates really work with g++: |
235 | 235 |
236 #define KLUDGE_MATRICES | |
237 #define TYPE double | |
238 #define KL_MAT_TYPE Matrix | |
239 #include "mx-kludge.h" | |
240 #undef KLUDGE_MATRICES | |
241 #undef TYPE | |
242 #undef KL_MAT_TYPE | |
243 | |
244 private: | 236 private: |
245 | 237 |
246 Matrix (double *d, int r, int c) : Array2<double> (d, r, c) { } | 238 Matrix (double *d, int r, int c) : MArray2<double> (d, r, c) { } |
247 }; | 239 }; |
248 | 240 |
249 } // extern "C++" | 241 } // extern "C++" |
250 | 242 |
251 #endif | 243 #endif |