comparison liboctave/dColVector.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
22 */ 22 */
23 23
24 #if !defined (octave_ColumnVector_h) 24 #if !defined (octave_ColumnVector_h)
25 #define octave_ColumnVector_h 1 25 #define octave_ColumnVector_h 1
26 26
27 #include "Array.h" 27 #include "MArray.h"
28 28
29 #include "mx-defs.h" 29 #include "mx-defs.h"
30 30
31 extern "C++" { 31 extern "C++" {
32 32
33 class ColumnVector : public Array<double> 33 class ColumnVector : public MArray<double>
34 { 34 {
35 friend class Matrix; 35 friend class Matrix;
36 friend class RowVector; 36 friend class RowVector;
37 37
38 public: 38 public:
39 39
40 ColumnVector (void) : Array<double> () { } 40 ColumnVector (void) : MArray<double> () { }
41 ColumnVector (int n) : Array<double> (n) { } 41 ColumnVector (int n) : MArray<double> (n) { }
42 ColumnVector (int n, double val) : Array<double> (n, val) { } 42 ColumnVector (int n, double val) : MArray<double> (n, val) { }
43 ColumnVector (const Array<double>& a) : Array<double> (a) { } 43 ColumnVector (const MArray<double>& a) : MArray<double> (a) { }
44 ColumnVector (const ColumnVector& a) : Array<double> (a) { } 44 ColumnVector (const ColumnVector& a) : MArray<double> (a) { }
45 45
46 ColumnVector& operator = (const ColumnVector& a) 46 ColumnVector& operator = (const ColumnVector& a)
47 { 47 {
48 Array<double>::operator = (a); 48 MArray<double>::operator = (a);
49 return *this; 49 return *this;
50 } 50 }
51 51
52 int operator == (const ColumnVector& a) const; 52 int operator == (const ColumnVector& a) const;
53 int operator != (const ColumnVector& a) const; 53 int operator != (const ColumnVector& a) const;
95 // i/o 95 // i/o
96 96
97 friend ostream& operator << (ostream& os, const ColumnVector& a); 97 friend ostream& operator << (ostream& os, const ColumnVector& a);
98 friend istream& operator >> (istream& is, ColumnVector& a); 98 friend istream& operator >> (istream& is, ColumnVector& a);
99 99
100 #define KLUDGE_VECTORS
101 #define TYPE double
102 #define KL_VEC_TYPE ColumnVector
103 #include "mx-kludge.h"
104 #undef KLUDGE_VECTORS
105 #undef TYPE
106 #undef KL_VEC_TYPE
107
108 private: 100 private:
109 101
110 ColumnVector (double *d, int l) : Array<double> (d, l) { } 102 ColumnVector (double *d, int l) : MArray<double> (d, l) { }
111 }; 103 };
112 104
113 } // extern "C++" 105 } // extern "C++"
114 106
115 #endif 107 #endif