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 ()
const;
77 bool isreal ()
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) \
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)
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
const void * mex_get_data() const
octave_base_value * clone() const
octave_base_value * empty_clone() const
octave_lazy_index(const octave::idx_vector &idx)
mxArray * as_mxArray(bool interleaved) const
std::size_t byte_size() const
builtin_type_t builtin_type() const
bool print_as_scalar() 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
octave_value all(int dim=0) const
octave_idx_type numel() const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
bool is_matrix_type() const
octave_lazy_index(const octave_lazy_index &i)
~octave_lazy_index()=default
bool is_double_type() 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
octave_value map(unary_mapper_t umap) const
bool is_real_matrix() const
MatrixType matrix_type(const MatrixType &_typ) const
MatrixType matrix_type() const
octave_value full_value() const
octave_idx_type nnz() 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
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)
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)