26 #if ! defined (octave_ov_struct_h)
27 #define octave_ov_struct_h 1
29 #include "octave-config.h"
67 void break_closure_cycles (
const std::shared_ptr<octave::stack_frame>& frame);
74 const std::list<octave_value_list>& idx)
81 const std::list<octave_value_list>&,
int);
84 const std::list<octave_value_list>& idx,
88 const std::string& type);
91 const std::list<octave_value_list>& idx,
97 {
return m_map.
permute (vec, inv); }
100 bool resize_ok =
false);
104 std::size_t byte_size (
void)
const;
110 return m_map.numel ();
116 {
return m_map.
reshape (new_dims); }
133 bool isfield (
const std::string& field_name)
const
134 {
return m_map.isfield (field_name); }
136 void print (std::ostream& os,
bool pr_as_read_syntax =
false);
138 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
140 bool print_name_tag (std::ostream& os,
const std::string& name)
const;
145 bool save_ascii (std::ostream& os);
147 bool load_ascii (std::istream& is);
149 bool save_binary (std::ostream& os,
bool save_as_floats);
151 bool load_binary (std::istream& is,
bool swap,
154 bool save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
158 mxArray * as_mxArray (
bool interleaved)
const;
200 void break_closure_cycles (
const std::shared_ptr<octave::stack_frame>& frame);
205 const std::list<octave_value_list>& idx);
208 const std::list<octave_value_list>& idx,
int);
211 const std::list<octave_value_list>& idx,
215 const std::string& type);
218 const std::list<octave_value_list>& idx,
227 bool resize_ok =
false);
231 std::size_t byte_size (
void)
const;
262 bool isfield (
const std::string& field_name)
const
263 {
return m_map.isfield (field_name); }
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;
269 bool print_name_tag (std::ostream& os,
const std::string& name)
const;
274 bool save_ascii (std::ostream& os);
276 bool load_ascii (std::istream& is);
278 bool save_binary (std::ostream& os,
bool save_as_floats);
280 bool load_binary (std::istream& is,
bool swap,
283 bool save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
287 mxArray * as_mxArray (
bool interleaved)
const;
289 bool fast_elem_insert_self (
void *where,
builtin_type_t btyp)
const;
Vector representing the dimensions (size) of an Array.
void resize(const dim_vector &dv, bool fill=false)
octave_map reshape(const dim_vector &dv) const
octave_map permute(const Array< int > &vec, bool inv=false) const
octave_base_value * empty_clone(void) const
octave_scalar_struct(const octave_scalar_map &m)
octave_value squeeze(void) const
dim_vector dims(void) const
octave_scalar_map scalar_map_value(void) const
string_vector map_keys(void) const
builtin_type_t builtin_type(void) const
octave_value reshape(const dim_vector &new_dims) const
octave_scalar_struct(const std::map< std::string, octave_value > &m)
octave_value permute(const Array< int > &vec, bool inv=false) const
octave_map map_value(void) const
bool is_defined(void) const
octave_idx_type nfields(void) const
octave_scalar_struct(const octave_scalar_struct &s)
~octave_scalar_struct(void)=default
bool is_constant(void) const
octave_base_value * clone(void) const
octave_idx_type numel(void) const
bool isfield(const std::string &field_name) const
bool isstruct(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_scalar_struct(void)
octave_base_value * clone(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_map map_value(void) const
octave_base_value * empty_clone(void) const
octave_value squeeze(void) const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
dim_vector dims(void) const
builtin_type_t builtin_type(void) const
octave_value reshape(const dim_vector &new_dims) const
bool isstruct(void) const
octave_struct(const octave_struct &s)
octave_struct(const octave_map &m)
octave_value permute(const Array< int > &vec, bool inv=false) const
bool isfield(const std::string &field_name) const
bool is_constant(void) const
octave_idx_type nfields(void) const
bool is_defined(void) const
~octave_struct(void)=default
string_vector map_keys(void) const
octave_idx_type numel(void) const
octave_idx_type length(void) const
octave_value permute(const Array< int > &vec, bool inv=false) const
octave_value squeeze(void) const
octave_value reshape(const dim_vector &dv) const
F77_RET_T const F77_DBLE * x
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