26 #if ! defined (octave_ov_lazy_idx_h)
27 #define octave_ov_lazy_idx_h 1
29 #include "octave-config.h"
57 type_conv_info numeric_conversion_function (
void)
const;
77 bool isreal (
void)
const {
return true; }
81 bool isfloat (
void)
const {
return true; }
89 const std::list<octave_value_list>& idx)
90 {
return make_value ().
subsref (type, idx); }
93 const std::list<octave_value_list>& idx,
int)
94 {
return subsref (type, idx); }
97 bool resize_ok =
false)
98 {
return make_value ().
index_op (idx, resize_ok); }
111 {
return make_value ().
resize (dv, fill); }
140 {
return make_value ().is_true (); }
143 {
return make_value ().print_as_scalar (); }
145 void print (std::ostream& os,
bool pr_as_read_syntax =
false)
146 { make_value ().print (os, pr_as_read_syntax); }
148 void print_info (std::ostream& os,
const std::string& prefix)
const
149 { make_value ().print_info (os, prefix); }
151 #define FORWARD_VALUE_QUERY(TYPE, NAME) \
152 TYPE NAME (void) const \
154 return make_value ().NAME (); \
166 #define FORWARD_VALUE_QUERY1(TYPE, NAME) \
167 TYPE NAME (bool flag = false) const \
169 return make_value ().NAME (flag); \
197 return make_value ().
diag (k);
218 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const
220 return make_value ().print_raw (os, pr_as_read_syntax);
223 bool save_ascii (std::ostream& os);
225 bool load_ascii (std::istream& is);
227 bool save_binary (std::ostream& os,
bool save_as_floats);
229 bool load_binary (std::istream& is,
bool swap,
232 int write (octave::stream& os,
int block_size,
236 return make_value ().write (os, block_size, output_type, skip, flt_fmt);
243 return make_value ().mex_get_data ();
248 return make_value ().as_mxArray (interleaved);
253 return make_value ().
map (umap);
260 if (m_value.is_undefined ())
268 if (m_value.is_undefined ())
Vector representing the dimensions (size) of an Array.
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
bool print_as_scalar(void) const
octave_value full_value(void) const
octave_idx_type nnz(void) const
bool isnumeric(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
bool is_real_matrix(void) const
bool is_defined(void) const
static octave_base_value * numeric_conversion_function(const octave_base_value &)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
bool is_double_type(void) const
const octave_value & make_value(void) const
octave_base_value * empty_clone(void) const
octave_lazy_index(const octave::idx_vector &idx)
dim_vector dims(void) const
builtin_type_t builtin_type(void) const
mxArray * as_mxArray(bool interleaved) const
const void * mex_get_data(void) const
octave_value & make_value(void)
octave_base_value * clone(void) const
std::size_t byte_size(void) const
void print(std::ostream &os, bool pr_as_read_syntax=false)
octave_value convert_to_str_internal(bool pad, bool force, char type) const
bool is_matrix_type(void) const
octave_value all(int dim=0) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
octave_lazy_index(const octave_lazy_index &i)
octave::idx_vector m_index
octave_idx_type numel(void) const
MatrixType matrix_type(void) const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
bool is_constant(void) const
octave_value map(unary_mapper_t umap) const
MatrixType matrix_type(const MatrixType &_typ) const
octave_value any(int dim=0) const
void print_info(std::ostream &os, const std::string &prefix) const
octave::idx_vector index_vector(bool=false) const
~octave_lazy_index(void)=default
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_value convert_to_str_internal(bool pad, bool force, char type) const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
octave_value index_op(const octave_value_list &idx, bool resize_ok=false)
octave_value any(int dim=0) const
octave_value map(octave_base_value::unary_mapper_t umap) const
octave_value all(int dim=0) const
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_value diag(octave_idx_type k=0) const
octave::idx_vector idx_vector
std::complex< double > Complex
std::complex< float > FloatComplex
T::size_type numel(const T &str)
static double as_double(OCTAVE_TIME_T sec, long usec)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
#define FORWARD_VALUE_QUERY(TYPE, NAME)
#define FORWARD_VALUE_QUERY1(TYPE, NAME)