Mercurial > hg > octave-lyh
diff 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 |
line wrap: on
line diff
--- a/liboctave/idx-vector.h +++ b/liboctave/idx-vector.h @@ -29,6 +29,7 @@ class ostream; class ColumnVector; +class boolMatrix; class Matrix; class Range; @@ -68,6 +69,10 @@ idx_vector_rep (char c); + idx_vector_rep (bool b); + + idx_vector_rep (const boolMatrix& bm); + idx_vector_rep (const idx_vector_rep& a); ~idx_vector_rep (void) { delete [] data; } @@ -128,7 +133,7 @@ void init_state (void); - void maybe_convert_one_zero_to_idx (int z_len, int prefer_zero_one); + void maybe_convert_one_zero_to_idx (int z_len); }; public: @@ -169,6 +174,18 @@ rep->count = 1; } + idx_vector (bool b) + { + rep = new idx_vector_rep (b); + rep->count = 1; + } + + idx_vector (const boolMatrix& bm) + { + rep = new idx_vector_rep (bm); + rep->count = 1; + } + idx_vector (const idx_vector& a) { rep = a.rep; @@ -238,8 +255,8 @@ friend ostream& operator << (ostream& os, const idx_vector& a) { return a.print (os); } - void maybe_convert_one_zero_to_idx (int z_len, int prefer_zero_one = 0) - { rep->maybe_convert_one_zero_to_idx (z_len, prefer_zero_one); } + void maybe_convert_one_zero_to_idx (int z_len) + { rep->maybe_convert_one_zero_to_idx (z_len); } private: