23 #if ! defined (octave_ov_range_h)
24 #define octave_ov_range_h 1
26 #include "octave-config.h"
63 if (
range.numel () < 0)
64 error (
"invalid range");
70 if (
range.numel () < 0 &&
range.numel () != -2)
71 error (
"invalid range");
76 idx_cache (r.idx_cache ? new
idx_vector (*r.idx_cache) : 0)
82 set_idx_cache (cache);
94 type_conv_info numeric_conversion_function (
void)
const;
99 const std::list<octave_value_list>& idx);
102 const std::list<octave_value_list>& idx,
int)
103 {
return subsref (type, idx); }
106 bool resize_ok =
false);
108 idx_vector index_vector (
bool require_integers =
false)
const;
121 {
return NDArray (array_value ().reshape (new_dims)); }
124 {
return NDArray (array_value ().permute (vec, inv)); }
172 double double_value (
bool =
false)
const;
174 float float_value (
bool =
false)
const;
177 {
return double_value (frc_str_conv); }
180 {
return float_value (frc_str_conv); }
183 {
return range.matrix_value (); }
186 {
return range.matrix_value (); }
189 {
return range.matrix_value (); }
230 Complex complex_value (
bool =
false)
const;
234 boolNDArray bool_array_value (
bool warn =
false)
const;
250 octave_value convert_to_str_internal (
bool pad,
bool force,
char type)
const;
265 void print (std::ostream& os,
bool pr_as_read_syntax =
false);
267 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
271 void short_disp (std::ostream& os)
const;
273 bool save_ascii (std::ostream& os);
275 bool load_ascii (std::istream&
is);
279 bool load_binary (std::istream&
is,
bool swap,
293 return os.
write (matrix_value (), block_size, output_type, skip, flt_fmt);
296 mxArray *as_mxArray (
void)
const;
319 delete idx_cache; idx_cache = 0;
FloatMatrix float_matrix_value(bool=false) const
bool is_true(const std::string &s)
intNDArray< octave_int64 > int64NDArray
float float_scalar_value(bool frc_str_conv=false) const
dim_vector dims(void) const
int8NDArray int8_array_value(void) const
Range range_value(void) const
octave_value permute(const Array< int > &vec, bool inv=false) const
uint8NDArray uint8_array_value(void) const
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, octave::mach_info::float_format flt_fmt)
uint64NDArray uint64_array_value(void) const
octave_value full_value(void) const
NDArray array_value(bool=false) const
intNDArray< octave_uint32 > uint32NDArray
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
idx subsref(val, idx) esult
intNDArray< octave_uint8 > uint8NDArray
intNDArray< octave_uint16 > uint16NDArray
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
Array< octave_idx_type > sort_rows_idx(sortmode) const
sortmode is_sorted(sortmode mode=UNSORTED) const
void error(const char *fmt,...)
int64NDArray int64_array_value(void) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
builtin_type_t builtin_type(void) const
octave_base_value * clone(void) const
octave::mach_info::float_format flt_fmt
octave_range(const Range &r, const idx_vector &cache)
bool is_float_type(void) const
bool is_range(void) const
SparseMatrix sparse_matrix_value(bool=false) const
uint32NDArray uint32_array_value(void) const
bool is_numeric_type(void) const
intNDArray< octave_int16 > int16NDArray
octave_range(const Range &r)
octave_value squeeze(void) const
double scalar_value(bool frc_str_conv=false) const
uint16NDArray uint16_array_value(void) const
void clear_cached_info(void) const
bool is_constant(void) const
int32NDArray int32_array_value(void) const
octave_range(const octave_range &r)
octave_value map(unary_mapper_t umap) const
bool is_defined(void) const
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
intNDArray< octave_int8 > int8NDArray
nd deftypefn *octave_map m
FloatNDArray float_array_value(bool=false) const
Matrix matrix_value(bool=false) const
size_t byte_size(void) const
bool is_real_type(void) const
int16NDArray int16_array_value(void) const
octave_range(double base, double limit, double inc)
octave_base_value * empty_clone(void) const
FloatComplexNDArray float_complex_array_value(bool=false) const
intNDArray< octave_int32 > int32NDArray
octave_value reshape(const dim_vector &new_dims) const
octave_value map(unary_mapper_t umap) const
issues an error eealso double
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
ComplexNDArray complex_array_value(bool=false) const
std::complex< float > FloatComplex
bool is_double_type(void) const
std::complex< double > Complex
write the output to stdout if nargout is
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
Vector representing the dimensions (size) of an Array.
the second is matched to the second specifier and placed in the second column and so forth If there are more words than specifiers then the process is repeated until all words have been processed or the limit imposed by any(non-whitespace) text in the format that is not one of these specifiers is considered a literal.If there is a literal between two format specifiers then that same literal must appear in the input stream between the matching words.The following specifiers are valid
ComplexMatrix complex_matrix_value(bool=false) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const
OCTAVE_EXPORT octave_value_list or cell arrays Arguments are concatenated vertically The returned values are padded with blanks as needed to make each row of the string array have the same length Empty input strings are significant and will concatenated in the output For numerical each element is converted to the corresponding ASCII character A range error results if an input is outside the ASCII range(0-255).For cell arrays
tree_walker & operator=(const tree_walker &)
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
intNDArray< octave_uint64 > uint64NDArray
idx_vector set_idx_cache(const idx_vector &idx) const