Mercurial > hg > octave-nkf
annotate libinterp/octave-value/ov-range.h @ 15767:e665645fb402
only register java type if using java
* ov.cc: Only include ov-java.h if HAVE_JAVA.
(install_types): Only call octave_java::register_type if HAVE_JAVA.
From Andreas Weber <andreas.weber@hs-offenburg.de>.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 12 Dec 2012 08:38:22 -0500 |
parents | 2fc554ffbc28 |
children | 0f143f68078d |
rev | line source |
---|---|
2376 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
12153
diff
changeset
|
3 Copyright (C) 1996-2012 John W. Eaton |
2376 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
2376 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
2376 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_range_h) | |
24 #define octave_range_h 1 | |
25 | |
26 #include <cstdlib> | |
27 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
28 #include <iosfwd> |
2376 | 29 #include <string> |
30 | |
31 #include "Range.h" | |
32 | |
2889 | 33 #include "lo-mappers.h" |
2376 | 34 #include "lo-utils.h" |
35 #include "mx-base.h" | |
2477 | 36 #include "oct-alloc.h" |
2376 | 37 #include "str-vec.h" |
38 | |
39 #include "error.h" | |
5051 | 40 #include "oct-stream.h" |
2376 | 41 #include "ov-base.h" |
6127 | 42 #include "ov-re-mat.h" |
2376 | 43 #include "ov-typeinfo.h" |
44 | |
45 class octave_value_list; | |
46 | |
47 class tree_walker; | |
48 | |
49 // Range values. | |
50 | |
51 class | |
52 octave_range : public octave_base_value | |
53 { | |
54 public: | |
55 | |
56 octave_range (void) | |
11584
cda4aa780d58
Another round of initialising members in the constructor initialisation list
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents:
11570
diff
changeset
|
57 : octave_base_value (), range (), idx_cache () { } |
2376 | 58 |
59 octave_range (double base, double limit, double inc) | |
9350
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
60 : octave_base_value (), range (base, limit, inc), idx_cache () |
2376 | 61 { |
10313 | 62 if (range.nelem () < 0) |
63 ::error ("invalid range"); | |
2376 | 64 } |
65 | |
66 octave_range (const Range& r) | |
9350
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
67 : octave_base_value (), range (r), idx_cache () |
2376 | 68 { |
10313 | 69 if (range.nelem () < 0 && range.nelem () != -2) |
70 ::error ("invalid range"); | |
2376 | 71 } |
72 | |
73 octave_range (const octave_range& r) | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
74 : octave_base_value (), range (r.range), |
9350
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
75 idx_cache (r.idx_cache ? new idx_vector (*r.idx_cache) : 0) |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
76 { } |
2376 | 77 |
9479
d9716e3ee0dd
supply optimized compiled sub2ind & ind2sub
Jaroslav Hajek <highegg@gmail.com>
parents:
9350
diff
changeset
|
78 octave_range (const Range& r, const idx_vector& cache) |
d9716e3ee0dd
supply optimized compiled sub2ind & ind2sub
Jaroslav Hajek <highegg@gmail.com>
parents:
9350
diff
changeset
|
79 : octave_base_value (), range (r), idx_cache () |
d9716e3ee0dd
supply optimized compiled sub2ind & ind2sub
Jaroslav Hajek <highegg@gmail.com>
parents:
9350
diff
changeset
|
80 { |
d9716e3ee0dd
supply optimized compiled sub2ind & ind2sub
Jaroslav Hajek <highegg@gmail.com>
parents:
9350
diff
changeset
|
81 set_idx_cache (cache); |
d9716e3ee0dd
supply optimized compiled sub2ind & ind2sub
Jaroslav Hajek <highegg@gmail.com>
parents:
9350
diff
changeset
|
82 } |
d9716e3ee0dd
supply optimized compiled sub2ind & ind2sub
Jaroslav Hajek <highegg@gmail.com>
parents:
9350
diff
changeset
|
83 |
9350
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
84 ~octave_range (void) { clear_cached_info (); } |
2376 | 85 |
5759 | 86 octave_base_value *clone (void) const { return new octave_range (*this); } |
6127 | 87 |
88 // A range is really just a special kind of real matrix object. In | |
89 // the places where we need to call empty_clone, it makes more sense | |
90 // to create an empty matrix (0x0) instead of an empty range (1x0). | |
91 octave_base_value *empty_clone (void) const { return new octave_matrix (); } | |
2376 | 92 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
93 type_conv_info numeric_conversion_function (void) const; |
2410 | 94 |
5759 | 95 octave_base_value *try_narrowing_conversion (void); |
2376 | 96 |
4247 | 97 octave_value subsref (const std::string& type, |
10313 | 98 const std::list<octave_value_list>& idx); |
3933 | 99 |
7651
443a8f5a50fd
require both subsref variants to be defined in octave_value subclasses
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
100 octave_value_list subsref (const std::string& type, |
10313 | 101 const std::list<octave_value_list>& idx, int) |
7651
443a8f5a50fd
require both subsref variants to be defined in octave_value subclasses
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
102 { return subsref (type, idx); } |
4271 | 103 |
5885 | 104 octave_value do_index_op (const octave_value_list& idx, |
10313 | 105 bool resize_ok = false); |
2436 | 106 |
10605
1834132fb50b
allow non-integer ranges as indices conditionally
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
107 idx_vector index_vector (void) const; |
2376 | 108 |
4563 | 109 dim_vector dims (void) const |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
110 { |
5275 | 111 octave_idx_type n = range.nelem (); |
4563 | 112 return dim_vector (n > 0, n); |
113 } | |
3195 | 114 |
5731 | 115 octave_value resize (const dim_vector& dv, bool fill = false) const; |
116 | |
4915 | 117 |
4792 | 118 size_t byte_size (void) const { return 3 * sizeof (double); } |
4791 | 119 |
4627 | 120 octave_value reshape (const dim_vector& new_dims) const |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14557
diff
changeset
|
121 { return NDArray (array_value ().reshape (new_dims)); } |
4627 | 122 |
5434 | 123 octave_value permute (const Array<int>& vec, bool inv = false) const |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14557
diff
changeset
|
124 { return NDArray (array_value ().permute (vec, inv)); } |
5434 | 125 |
6999 | 126 octave_value squeeze (void) const { return range; } |
127 | |
8458
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
128 octave_value full_value (void) const { return range.matrix_value (); } |
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
129 |
2376 | 130 bool is_defined (void) const { return true; } |
131 | |
2974 | 132 bool is_constant (void) const { return true; } |
133 | |
2376 | 134 bool is_range (void) const { return true; } |
135 | |
4017 | 136 octave_value all (int dim = 0) const; |
137 | |
138 octave_value any (int dim = 0) const; | |
2376 | 139 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
140 octave_value diag (octave_idx_type k = 0) const; |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
141 |
14557
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
142 octave_value diag (octave_idx_type m, octave_idx_type n) const; |
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
143 |
7463
2467639bd8c0
eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents:
7458
diff
changeset
|
144 octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const |
7458 | 145 { return range.sort (dim, mode); } |
146 | |
147 octave_value sort (Array<octave_idx_type>& sidx, octave_idx_type dim = 0, | |
10313 | 148 sortmode mode = ASCENDING) const |
7458 | 149 { return range.sort (sidx, dim, mode); } |
150 | |
8734
767ed8cc6634
rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows
John W. Eaton <jwe@octave.org>
parents:
8733
diff
changeset
|
151 sortmode is_sorted (sortmode mode = UNSORTED) const |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
152 { return range.is_sorted (mode); } |
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
153 |
8733
3ef774603887
rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents:
8721
diff
changeset
|
154 Array<octave_idx_type> sort_rows_idx (sortmode) const |
11570
57632dea2446
attempt better backward compatibility for Array constructors
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
155 { return Array<octave_idx_type> (dim_vector (1, 0)); } |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
156 |
8734
767ed8cc6634
rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows
John W. Eaton <jwe@octave.org>
parents:
8733
diff
changeset
|
157 sortmode is_sorted_rows (sortmode mode = UNSORTED) const |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
158 { return mode ? mode : ASCENDING; } |
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
159 |
9685 | 160 builtin_type_t builtin_type (void) const { return btyp_double; } |
161 | |
2376 | 162 bool is_real_type (void) const { return true; } |
163 | |
5895 | 164 bool is_double_type (void) const { return true; } |
165 | |
7576 | 166 bool is_float_type (void) const { return true; } |
167 | |
3678 | 168 bool is_numeric_type (void) const { return true; } |
169 | |
2376 | 170 bool is_true (void) const; |
171 | |
3145 | 172 double double_value (bool = false) const; |
2376 | 173 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
174 float float_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
175 |
3145 | 176 double scalar_value (bool frc_str_conv = false) const |
177 { return double_value (frc_str_conv); } | |
2916 | 178 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
179 float float_scalar_value (bool frc_str_conv = false) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
180 { return float_value (frc_str_conv); } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
181 |
3145 | 182 Matrix matrix_value (bool = false) const |
2376 | 183 { return range.matrix_value (); } |
184 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
185 FloatMatrix float_matrix_value (bool = false) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
186 { return range.matrix_value (); } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
187 |
4668 | 188 NDArray array_value (bool = false) const |
189 { return range.matrix_value (); } | |
190 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
191 FloatNDArray float_array_value (bool = false) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
192 { return FloatMatrix (range.matrix_value ()); } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
193 |
9146
a48c500e48e1
support range->string conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8971
diff
changeset
|
194 charNDArray char_array_value (bool = false) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
195 |
6934 | 196 // FIXME -- it would be better to have Range::intXNDArray_value |
197 // functions to avoid the intermediate conversion to a matrix | |
198 // object. | |
199 | |
6932 | 200 int8NDArray |
201 int8_array_value (void) const { return int8NDArray (array_value ()); } | |
202 | |
203 int16NDArray | |
204 int16_array_value (void) const { return int16NDArray (array_value ()); } | |
205 | |
206 int32NDArray | |
207 int32_array_value (void) const { return int32NDArray (array_value ()); } | |
208 | |
209 int64NDArray | |
210 int64_array_value (void) const { return int64NDArray (array_value ()); } | |
211 | |
212 uint8NDArray | |
213 uint8_array_value (void) const { return uint8NDArray (array_value ()); } | |
214 | |
215 uint16NDArray | |
216 uint16_array_value (void) const { return uint16NDArray (array_value ()); } | |
217 | |
218 uint32NDArray | |
219 uint32_array_value (void) const { return uint32NDArray (array_value ()); } | |
220 | |
221 uint64NDArray | |
222 uint64_array_value (void) const { return uint64NDArray (array_value ()); } | |
223 | |
6928 | 224 SparseMatrix sparse_matrix_value (bool = false) const |
225 { return SparseMatrix (range.matrix_value ()); } | |
226 | |
227 SparseComplexMatrix sparse_complex_matrix_value (bool = false) const | |
228 { return SparseComplexMatrix (sparse_matrix_value ()); } | |
229 | |
3145 | 230 Complex complex_value (bool = false) const; |
2376 | 231 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
232 FloatComplex float_complex_value (bool = false) const; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
233 |
10613
e103fb2182ce
use internal variable instead of warning state to control whether to allow non-integer ranges as indices
John W. Eaton <jwe@octave.org>
parents:
10605
diff
changeset
|
234 boolNDArray bool_array_value (bool warn = false) const; |
5898 | 235 |
3145 | 236 ComplexMatrix complex_matrix_value (bool = false) const |
3587 | 237 { return ComplexMatrix (range.matrix_value ()); } |
2376 | 238 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
239 FloatComplexMatrix float_complex_matrix_value (bool = false) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
240 { return FloatComplexMatrix (range.matrix_value ()); } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
241 |
4668 | 242 ComplexNDArray complex_array_value (bool = false) const |
243 { return ComplexMatrix (range.matrix_value ()); } | |
244 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
245 FloatComplexNDArray float_complex_array_value (bool = false) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
246 { return FloatComplexMatrix (range.matrix_value ()); } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
247 |
2376 | 248 Range range_value (void) const { return range; } |
249 | |
5279 | 250 octave_value convert_to_str_internal (bool pad, bool force, char type) const; |
2449 | 251 |
3523 | 252 void print (std::ostream& os, bool pr_as_read_syntax = false) const; |
2901 | 253 |
3523 | 254 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; |
2901 | 255 |
3523 | 256 bool print_name_tag (std::ostream& os, const std::string& name) const; |
2376 | 257 |
6974 | 258 bool save_ascii (std::ostream& os); |
4687 | 259 |
260 bool load_ascii (std::istream& is); | |
261 | |
262 bool save_binary (std::ostream& os, bool& save_as_floats); | |
263 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
264 bool load_binary (std::istream& is, bool swap, |
10313 | 265 oct_mach_info::float_format fmt); |
4687 | 266 |
267 #if defined (HAVE_HDF5) | |
268 bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); | |
269 | |
9881
b3089dba88bf
Remove HDF5 cruft for older versions of HDF5
Kacper Kowalik
parents:
9812
diff
changeset
|
270 bool load_hdf5 (hid_t loc_id, const char *name); |
4687 | 271 #endif |
272 | |
5051 | 273 int write (octave_stream& os, int block_size, |
10313 | 274 oct_data_conv::data_type output_type, int skip, |
275 oct_mach_info::float_format flt_fmt) const | |
5051 | 276 { |
5775 | 277 // FIXME -- could be more memory efficient by having a |
5051 | 278 // special case of the octave_stream::write method for ranges. |
279 | |
280 return os.write (matrix_value (), block_size, output_type, skip, | |
10313 | 281 flt_fmt); |
5051 | 282 } |
283 | |
5900 | 284 mxArray *as_mxArray (void) const; |
285 | |
9812
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9685
diff
changeset
|
286 octave_value map (unary_mapper_t umap) const |
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9685
diff
changeset
|
287 { |
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9685
diff
changeset
|
288 octave_matrix m (matrix_value ()); |
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9685
diff
changeset
|
289 return m.map (umap); |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7463
diff
changeset
|
290 } |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7463
diff
changeset
|
291 |
2376 | 292 private: |
293 | |
294 Range range; | |
295 | |
9350
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
296 idx_vector set_idx_cache (const idx_vector& idx) const |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
297 { |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
298 delete idx_cache; |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
299 idx_cache = idx ? new idx_vector (idx) : 0; |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
300 return idx; |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
301 } |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
302 |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
303 void clear_cached_info (void) const |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
304 { |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
305 delete idx_cache; idx_cache = 0; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11584
diff
changeset
|
306 } |
9350
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
307 |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
308 mutable idx_vector *idx_cache; |
16a5f9e1fdb3
cache idx_vector result in matrices once used for indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
9146
diff
changeset
|
309 |
12153
e0e50f48df37
Explicitly disallow copying in some classes
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents:
11586
diff
changeset
|
310 // No assignment. |
e0e50f48df37
Explicitly disallow copying in some classes
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents:
11586
diff
changeset
|
311 |
e0e50f48df37
Explicitly disallow copying in some classes
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents:
11586
diff
changeset
|
312 octave_range& operator = (const octave_range&); |
e0e50f48df37
Explicitly disallow copying in some classes
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents:
11586
diff
changeset
|
313 |
4612 | 314 DECLARE_OCTAVE_ALLOCATOR |
2477 | 315 |
4612 | 316 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
2376 | 317 }; |
318 | |
10613
e103fb2182ce
use internal variable instead of warning state to control whether to allow non-integer ranges as indices
John W. Eaton <jwe@octave.org>
parents:
10605
diff
changeset
|
319 // If TRUE, allow ranges with non-integer elements as array indices. |
e103fb2182ce
use internal variable instead of warning state to control whether to allow non-integer ranges as indices
John W. Eaton <jwe@octave.org>
parents:
10605
diff
changeset
|
320 extern bool Vallow_noninteger_range_as_index; |
e103fb2182ce
use internal variable instead of warning state to control whether to allow non-integer ranges as indices
John W. Eaton <jwe@octave.org>
parents:
10605
diff
changeset
|
321 |
2376 | 322 #endif |