Mercurial > octave
comparison liboctave/idx-vector.h @ 10285:22a7913bbeb5
optimize return values of find and sort
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 09 Feb 2010 12:56:47 +0100 |
parents | 3a8c13b71612 |
children | cbc402e64d83 |
comparison
equal
deleted
inserted
replaced
10284:c3df189b1b15 | 10285:22a7913bbeb5 |
---|---|
285 { } | 285 { } |
286 | 286 |
287 // Zero-based constructor. | 287 // Zero-based constructor. |
288 idx_vector_rep (const Array<octave_idx_type>& inda); | 288 idx_vector_rep (const Array<octave_idx_type>& inda); |
289 | 289 |
290 idx_vector_rep (const Array<octave_idx_type>& inda, | |
291 octave_idx_type _ext, direct); | |
292 | |
290 template <class T> | 293 template <class T> |
291 idx_vector_rep (const Array<T>&); | 294 idx_vector_rep (const Array<T>&); |
292 | 295 |
293 idx_vector_rep (bool); | 296 idx_vector_rep (bool); |
294 | 297 |
470 } | 473 } |
471 | 474 |
472 idx_vector (const Array<octave_idx_type>& inda) | 475 idx_vector (const Array<octave_idx_type>& inda) |
473 : rep (new idx_vector_rep (inda)) | 476 : rep (new idx_vector_rep (inda)) |
474 { chkerr (); } | 477 { chkerr (); } |
478 | |
479 // Directly pass extent, no checking. | |
480 idx_vector (const Array<octave_idx_type>& inda, octave_idx_type ext) | |
481 : rep (new idx_vector_rep (inda, ext, DIRECT)) | |
482 { } | |
475 | 483 |
476 // Colon is best constructed by simply copying (or referencing) this member. | 484 // Colon is best constructed by simply copying (or referencing) this member. |
477 static const idx_vector colon; | 485 static const idx_vector colon; |
478 | 486 |
479 // or passing ':' here | 487 // or passing ':' here |