26#if defined (HAVE_CONFIG_H)
85 return tmp.
index_op (idx, resize_ok);
91 return static_cast<double> (
scalar);
97 return static_cast<float> (
scalar);
171 s[0] =
static_cast<char> (
scalar);
182 octave::write_value<double> (os,
d);
191 scalar = (octave::read_value<double> (is) != 0.0);
194 error (
"load: failed to load scalar constant");
202 char tmp = (
scalar ? 1 : 0);
203 os.write (
reinterpret_cast<char *
> (&tmp), 1);
210 octave::mach_info::float_format )
213 if (! is.read (
reinterpret_cast<char *
> (&tmp), 1))
225#if defined (HAVE_HDF5)
227 hsize_t dimens[3] = {0};
228 hid_t space_hid, data_hid;
229 space_hid = data_hid = -1;
231 space_hid = H5Screate_simple (0, dimens,
nullptr);
232 if (space_hid < 0)
return false;
233#if defined (HAVE_HDF5_18)
234 data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_DOUBLE, space_hid,
238 data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_DOUBLE, space_hid,
243 H5Sclose (space_hid);
252 H5Sclose (space_hid);
255 octave_unused_parameter (loc_id);
256 octave_unused_parameter (name);
267#if defined (HAVE_HDF5)
269#if defined (HAVE_HDF5_18)
272 hid_t data_hid = H5Dopen (loc_id, name);
274 hid_t space_id = H5Dget_space (data_hid);
276 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
297 octave_unused_parameter (loc_id);
298 octave_unused_parameter (name);
309 mxArray *retval =
new mxArray (interleaved, mxLOGICAL_CLASS, 1, 1, mxREAL);
311 mxLogical *pd =
static_cast<mxLogical *
> (retval->
get_data ());
Vector representing the dimensions (size) of an Array.
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
void warn_load(const char *type) const
friend class octave_value
void warn_save(const char *type) const
type_conv_info numeric_conversion_function() const
octave_value as_int8() const
octave_value as_int64() const
octave_value as_uint64() const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
octave_value as_int16() const
octave_value as_single() const
octave_value as_uint16() const
boolMatrix bool_matrix_value(bool=false) const
octave_value as_uint8() const
octave_value as_uint32() const
double double_value(bool=false) const
octave_value as_double() const
bool load_ascii(std::istream &is)
bool bool_value(bool=false) const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
octave_value resize(const dim_vector &dv, bool fill=false) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool save_ascii(std::ostream &os)
bool save_binary(std::ostream &os, bool save_as_floats)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
mxArray * as_mxArray(bool interleaved) const
octave_value as_int32() const
static int static_type_id()
octave_value index_op(const octave_value_list &idx, bool resize_ok=false)
const octave_hdf5_id octave_H5P_DEFAULT
const octave_hdf5_id octave_H5S_ALL
void error(const char *fmt,...)
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
octave_int< uint32_t > octave_uint32
octave_int< int32_t > octave_int32
octave_int< int16_t > octave_int16
octave_int< int8_t > octave_int8
octave_int< int64_t > octave_int64
octave_int< uint64_t > octave_uint64
octave_int< uint16_t > octave_uint16
octave_int< uint8_t > octave_uint8
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)