23 #if ! defined (octave_ov_range_h) 24 #define octave_ov_range_h 1 26 #include "octave-config.h" 61 if (
range.numel () < 0)
62 error (
"invalid range");
68 if (
range.numel () < 0 &&
range.numel () != -2)
69 error (
"invalid range");
74 idx_cache (r.idx_cache ? new
idx_vector (*r.idx_cache) : nullptr)
80 set_idx_cache (cache);
92 type_conv_info numeric_conversion_function (
void)
const;
97 const std::list<octave_value_list>& idx);
100 const std::list<octave_value_list>& idx,
int)
104 bool resize_ok =
false);
106 idx_vector index_vector (
bool require_integers =
false)
const;
162 bool isreal (
void)
const {
return true; }
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;
278 bool save_ascii (std::ostream&
os);
280 bool load_ascii (std::istream&
is);
284 bool load_binary (std::istream&
is,
bool swap,
298 return os.
write (matrix_value (), block_size, output_type, skip,
flt_fmt);
301 mxArray * as_mxArray (
void)
const;
318 idx_cache = (idx ?
new idx_vector (idx) :
nullptr);
324 delete idx_cache; idx_cache =
nullptr;
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, mach_info::float_format flt_fmt)
bool is_constant(void) const
int64NDArray int64_array_value(void) const
intNDArray< octave_int64 > int64NDArray
Matrix matrix_value(bool=false) const
int8NDArray int8_array_value(void) const
FloatNDArray float_array_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
ComplexNDArray complex_array_value(bool=false) const
uint32NDArray uint32_array_value(void) const
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
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
bool isnumeric(void) const
FloatComplexNDArray float_complex_array_value(bool=false) const
octave_base_value * empty_clone(void) const
SparseMatrix sparse_matrix_value(bool=false) const
void error(const char *fmt,...)
FloatMatrix float_matrix_value(bool=false) const
octave::mach_info::float_format flt_fmt
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
octave_range(const Range &r, const idx_vector &cache)
intNDArray< octave_int16 > int16NDArray
octave_range(const Range &r)
int32NDArray int32_array_value(void) const
Range range_value(void) const
octave_value map(unary_mapper_t umap) const
uint16NDArray uint16_array_value(void) const
octave_range(const octave_range &r)
static double as_double(time_t sec, long usec)
double scalar_value(bool frc_str_conv=false) const
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
bool is_defined(void) const
nd deftypefn *std::string name
octave_base_value * clone(void) const
sortmode issorted(sortmode mode=UNSORTED) const
octave_value reshape(const dim_vector &new_dims) const
intNDArray< octave_int8 > int8NDArray
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
ComplexMatrix complex_matrix_value(bool=false) const
Array< octave_value > array_value(void) const
void clear_cached_info(void) const
idx_vector set_idx_cache(const idx_vector &idx) const
bool is_true(const std::string &s)
octave_value permute(const Array< int > &vec, bool inv=false) const
octave_value squeeze(void) const
octave_value map(unary_mapper_t umap) const
int16NDArray int16_array_value(void) const
octave_range(double base, double limit, double inc)
bool is_range(void) const
uint8NDArray uint8_array_value(void) const
builtin_type_t builtin_type(void) const
intNDArray< octave_int32 > int32NDArray
octave_idx_type nnz(void) const
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_value full_value(void) const
dim_vector dims(void) const
Array< octave_idx_type > sort_rows_idx(sortmode) const
uint64NDArray uint64_array_value(void) const
NDArray array_value(bool=false) const
void resize(octave_idx_type n, const octave_value &rfv=octave_value())
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
std::complex< float > FloatComplex
bool is_double_type(void) const
std::complex< double > Complex
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
write the output to stdout if nargout is
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
Vector representing the dimensions (size) of an Array.
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
size_t byte_size(void) const
float float_scalar_value(bool frc_str_conv=false) const
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_value_list & operator=(const octave_value_list &obj)
static float_display_format get_edit_display_format(const octave_value &val)
intNDArray< octave_uint64 > uint64NDArray