Mercurial > octave
comparison liboctave/Array.h @ 3933:f9ea3dcf58ee
[project @ 2002-05-15 03:21:00 by jwe]
author | jwe |
---|---|
date | Wed, 15 May 2002 03:21:01 +0000 |
parents | e8627dc4bdf2 |
children | 818f5aec1db5 |
comparison
equal
deleted
inserted
replaced
3932:2e2e32198722 | 3933:f9ea3dcf58ee |
---|---|
27 #if defined (__GNUG__) | 27 #if defined (__GNUG__) |
28 #pragma interface | 28 #pragma interface |
29 #endif | 29 #endif |
30 | 30 |
31 #include <cassert> | 31 #include <cassert> |
32 | |
33 #include <iostream> | |
32 | 34 |
33 #include "lo-utils.h" | 35 #include "lo-utils.h" |
34 | 36 |
35 class idx_vector; | 37 class idx_vector; |
36 | 38 |
230 | 232 |
231 return *this; | 233 return *this; |
232 } | 234 } |
233 | 235 |
234 #ifdef HEAVYWEIGHT_INDEXING | 236 #ifdef HEAVYWEIGHT_INDEXING |
237 | |
235 void set_max_indices (int mi) { max_indices = mi; } | 238 void set_max_indices (int mi) { max_indices = mi; } |
236 | 239 |
237 void clear_index (void); | 240 void clear_index (void); |
238 | 241 |
239 void set_index (const idx_vector& i); | 242 void set_index (const idx_vector& i); |
244 | 247 |
245 void maybe_delete_elements (idx_vector& i); | 248 void maybe_delete_elements (idx_vector& i); |
246 | 249 |
247 Array<T> value (void); | 250 Array<T> value (void); |
248 | 251 |
249 Array<T> index (idx_vector& i) const; | 252 Array<T> index (idx_vector& i, int resize_ok = 0, |
253 const T& rfv = Array<T>::resize_fill_value ()) const; | |
254 | |
250 #endif | 255 #endif |
251 | 256 |
252 static T resize_fill_value (void) { return static_cast<T> (0); } | 257 static T resize_fill_value (void) { return static_cast<T> (0); } |
258 | |
259 void print_info (std::ostream& os, const std::string& prefix) const; | |
253 }; | 260 }; |
254 | 261 |
255 template <class LT, class RT> | 262 template <class LT, class RT> |
256 int | 263 int |
257 assign (Array<LT>& lhs, const Array<RT>& rhs, const LT& resize_fill_value); | 264 assign (Array<LT>& lhs, const Array<RT>& rhs, const LT& resize_fill_value); |