Mercurial > hg > octave-lyh
annotate src/TEMPLATE-INST/Array-tc.cc @ 8721:e9cb742df9eb
imported patch sort3.diff
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 11 Feb 2009 15:25:53 +0100 |
parents | 314be237cd5b |
children | d5af326a3ede |
rev | line source |
---|---|
2928 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, |
4 2007 John W. Eaton | |
2928 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
2928 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
2928 | 21 |
22 */ | |
23 | |
24 // Instantiate Arrays of octave_values. | |
25 | |
26 #ifdef HAVE_CONFIG_H | |
27 #include <config.h> | |
28 #endif | |
29 | |
30 #include "Array.h" | |
31 #include "Array.cc" | |
32 | |
3354 | 33 #include "Array2.h" |
34 | |
4513 | 35 #include "ArrayN.h" |
36 #include "ArrayN.cc" | |
37 | |
3354 | 38 #include "DiagArray2.h" |
39 #include "DiagArray2.cc" | |
40 | |
4055 | 41 #include "oct-obj.h" |
2928 | 42 |
7433 | 43 #include "oct-sort.cc" |
44 | |
45 template <> | |
46 bool | |
8700 | 47 octave_sort<octave_value>::ascending_compare (octave_value a, octave_value b) |
7433 | 48 { |
49 return (a.string_value () < b.string_value ()); | |
50 } | |
51 | |
52 template <> | |
53 bool | |
8700 | 54 octave_sort<octave_value>::descending_compare (octave_value a, octave_value b) |
7433 | 55 { |
56 return (a.string_value () > b.string_value ()); | |
57 } | |
58 | |
59 INSTANTIATE_ARRAY_SORT (octave_value); | |
60 | |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8700
diff
changeset
|
61 INSTANTIATE_ARRAY (octave_value, OCTINTERP_API); |
4598 | 62 |
6109 | 63 template class OCTINTERP_API Array2<octave_value>; |
2928 | 64 |
6109 | 65 template class OCTINTERP_API ArrayN<octave_value>; |
4513 | 66 |
2928 | 67 /* |
68 ;;; Local Variables: *** | |
69 ;;; mode: C++ *** | |
70 ;;; End: *** | |
71 */ |