comparison liboctave/idx-vector.h @ 2828:92826d6e8bd9

[project @ 1997-03-25 23:41:41 by jwe]
author jwe
date Tue, 25 Mar 1997 23:50:08 +0000
parents bca5fbab2e52
children 10a8198b1733
comparison
equal deleted inserted replaced
2827:2387b8694c75 2828:92826d6e8bd9
27 #pragma interface 27 #pragma interface
28 #endif 28 #endif
29 29
30 class ostream; 30 class ostream;
31 class ColumnVector; 31 class ColumnVector;
32 class boolMatrix;
32 class Matrix; 33 class Matrix;
33 class Range; 34 class Range;
34 35
35 class 36 class
36 idx_vector 37 idx_vector
65 idx_vector_rep (const Range& r); 66 idx_vector_rep (const Range& r);
66 67
67 idx_vector_rep (double d); 68 idx_vector_rep (double d);
68 69
69 idx_vector_rep (char c); 70 idx_vector_rep (char c);
71
72 idx_vector_rep (bool b);
73
74 idx_vector_rep (const boolMatrix& bm);
70 75
71 idx_vector_rep (const idx_vector_rep& a); 76 idx_vector_rep (const idx_vector_rep& a);
72 77
73 ~idx_vector_rep (void) { delete [] data; } 78 ~idx_vector_rep (void) { delete [] data; }
74 79
126 unsigned int colon_equiv_checked : 1; 131 unsigned int colon_equiv_checked : 1;
127 unsigned int colon_equiv : 1; 132 unsigned int colon_equiv : 1;
128 133
129 void init_state (void); 134 void init_state (void);
130 135
131 void maybe_convert_one_zero_to_idx (int z_len, int prefer_zero_one); 136 void maybe_convert_one_zero_to_idx (int z_len);
132 }; 137 };
133 138
134 public: 139 public:
135 140
136 idx_vector (void) 141 idx_vector (void)
164 } 169 }
165 170
166 idx_vector (char c) 171 idx_vector (char c)
167 { 172 {
168 rep = new idx_vector_rep (c); 173 rep = new idx_vector_rep (c);
174 rep->count = 1;
175 }
176
177 idx_vector (bool b)
178 {
179 rep = new idx_vector_rep (b);
180 rep->count = 1;
181 }
182
183 idx_vector (const boolMatrix& bm)
184 {
185 rep = new idx_vector_rep (bm);
169 rep->count = 1; 186 rep->count = 1;
170 } 187 }
171 188
172 idx_vector (const idx_vector& a) 189 idx_vector (const idx_vector& a)
173 { 190 {
236 ostream& print (ostream& os) const { return rep->print (os); } 253 ostream& print (ostream& os) const { return rep->print (os); }
237 254
238 friend ostream& operator << (ostream& os, const idx_vector& a) 255 friend ostream& operator << (ostream& os, const idx_vector& a)
239 { return a.print (os); } 256 { return a.print (os); }
240 257
241 void maybe_convert_one_zero_to_idx (int z_len, int prefer_zero_one = 0) 258 void maybe_convert_one_zero_to_idx (int z_len)
242 { rep->maybe_convert_one_zero_to_idx (z_len, prefer_zero_one); } 259 { rep->maybe_convert_one_zero_to_idx (z_len); }
243 260
244 private: 261 private:
245 262
246 idx_vector_rep *rep; 263 idx_vector_rep *rep;
247 264