comparison liboctave/idx-vector.h @ 4504:f6a61399bc5c

[project @ 2003-09-09 17:48:00 by jwe]
author jwe
date Tue, 09 Sep 2003 17:49:13 +0000
parents af308ca1a354
children 623f6262a8e9
comparison
equal deleted inserted replaced
4503:55db663c15ce 4504:f6a61399bc5c
26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) 26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
27 #pragma interface 27 #pragma interface
28 #endif 28 #endif
29 29
30 #include <iostream> 30 #include <iostream>
31
32 #include "Array.h"
31 33
32 class ColumnVector; 34 class ColumnVector;
33 class boolMatrix; 35 class boolMatrix;
34 class Matrix; 36 class Matrix;
35 class Range; 37 class Range;
105 void sort (bool uniq); 107 void sort (bool uniq);
106 108
107 int orig_rows (void) const { return orig_nr; } 109 int orig_rows (void) const { return orig_nr; }
108 int orig_columns (void) const { return orig_nc; } 110 int orig_columns (void) const { return orig_nc; }
109 111
112 Array<int> orig_dimensions (void) const { return orig_dims; }
113
110 // other stuff 114 // other stuff
111 115
112 void shorten (int n); // Unsafe. Avoid at all cost. 116 void shorten (int n); // Unsafe. Avoid at all cost.
113 117
114 int freeze (int z_len, const char *tag, bool resize_ok, bool warn_resize); 118 int freeze (int z_len, const char *tag, bool resize_ok, bool warn_resize);
121 int len; 125 int len;
122 int num_zeros; 126 int num_zeros;
123 int num_ones; 127 int num_ones;
124 int max_val; 128 int max_val;
125 int min_val; 129 int min_val;
130
131 // XXX FIXME XXX -- with the introduction of orig_dims, these two
132 // variables are not neccessary. orig_dims(0) and orig_dims(1)
133 // should replace them in the code.
134
126 int orig_nr; 135 int orig_nr;
127 int orig_nc; 136 int orig_nc;
137
138 Array<int> orig_dims;
139
128 int count; 140 int count;
129 int frozen_at_z_len; 141 int frozen_at_z_len;
130 int frozen_len; 142 int frozen_len;
131 unsigned int colon : 1; 143 unsigned int colon : 1;
132 unsigned int one_zero : 1; 144 unsigned int one_zero : 1;
244 void sort (bool uniq = false) { rep->sort (uniq); } 256 void sort (bool uniq = false) { rep->sort (uniq); }
245 257
246 int orig_rows (void) const { return rep->orig_rows (); } 258 int orig_rows (void) const { return rep->orig_rows (); }
247 int orig_columns (void) const { return rep->orig_columns (); } 259 int orig_columns (void) const { return rep->orig_columns (); }
248 260
261 Array<int> orig_dimensions (void) const { return rep->orig_dimensions (); }
262
249 int orig_empty (void) const 263 int orig_empty (void) const
250 { 264 {
251 return (! is_colon () 265 return (! is_colon ()
252 && (orig_rows () == 0 || orig_columns () == 0)); 266 && (orig_rows () == 0 || orig_columns () == 0));
253 } 267 }