Mercurial > hg > octave-max
comparison liboctave/Array.cc @ 7463:2467639bd8c0
eliminate UNDEFINED sort mode
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 08 Feb 2008 16:00:16 -0500 |
parents | d98dea7d16b0 |
children | 93826ba0d078 |
comparison
equal
deleted
inserted
replaced
7462:dfcaf7ed48e3 | 7463:2467639bd8c0 |
---|---|
2496 | 2496 |
2497 if (mode == ASCENDING) | 2497 if (mode == ASCENDING) |
2498 lsort.set_compare (ascending_compare); | 2498 lsort.set_compare (ascending_compare); |
2499 else if (mode == DESCENDING) | 2499 else if (mode == DESCENDING) |
2500 lsort.set_compare (descending_compare); | 2500 lsort.set_compare (descending_compare); |
2501 else | |
2502 abort (); | |
2501 | 2503 |
2502 if (stride == 1) | 2504 if (stride == 1) |
2503 { | 2505 { |
2504 for (octave_idx_type j = 0; j < iter; j++) | 2506 for (octave_idx_type j = 0; j < iter; j++) |
2505 { | 2507 { |
2564 | 2566 |
2565 if (mode == ASCENDING) | 2567 if (mode == ASCENDING) |
2566 indexed_sort.set_compare (ascending_compare); | 2568 indexed_sort.set_compare (ascending_compare); |
2567 else if (mode == DESCENDING) | 2569 else if (mode == DESCENDING) |
2568 indexed_sort.set_compare (descending_compare); | 2570 indexed_sort.set_compare (descending_compare); |
2571 else | |
2572 abort (); | |
2569 | 2573 |
2570 OCTAVE_LOCAL_BUFFER (vec_index<T> *, vi, ns); | 2574 OCTAVE_LOCAL_BUFFER (vec_index<T> *, vi, ns); |
2571 OCTAVE_LOCAL_BUFFER (vec_index<T>, vix, ns); | 2575 OCTAVE_LOCAL_BUFFER (vec_index<T>, vix, ns); |
2572 | 2576 |
2573 for (octave_idx_type i = 0; i < ns; i++) | 2577 for (octave_idx_type i = 0; i < ns; i++) |