26 #if defined (HAVE_CONFIG_H)
136 return static_cast<float> (
scalar);
209 ::warning (
"range error for conversion to character value");
232 scalar = octave_read_value<double> (is);
235 error (
"load: failed to load scalar constant");
244 os.write (
reinterpret_cast<char *
> (&tmp), 1);
246 os.write (
reinterpret_cast<char *
> (&dtmp), 8);
256 if (! is.read (
reinterpret_cast<char *
> (&tmp), 1))
275 #if defined (HAVE_HDF5)
278 hid_t space_hid, data_hid;
279 space_hid = data_hid = -1;
281 space_hid = H5Screate_simple (0, dimens,
nullptr);
282 if (space_hid < 0)
return false;
284 #if defined (HAVE_HDF5_18)
285 data_hid = H5Dcreate (loc_id,
name, H5T_NATIVE_DOUBLE, space_hid,
288 data_hid = H5Dcreate (loc_id,
name, H5T_NATIVE_DOUBLE, space_hid,
293 H5Sclose (space_hid);
302 H5Sclose (space_hid);
305 octave_unused_parameter (loc_id);
306 octave_unused_parameter (
name);
317 #if defined (HAVE_HDF5)
319 #if defined (HAVE_HDF5_18)
322 hid_t data_hid = H5Dopen (loc_id,
name);
324 hid_t space_id = H5Dget_space (data_hid);
326 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
349 octave_unused_parameter (loc_id);
350 octave_unused_parameter (
name);
363 double *pr =
static_cast<double *
> (
retval->get_data ());
382 #define SCALAR_MAPPER(UMAP, FCN) \
383 case umap_ ## UMAP: \
384 return octave_value (FCN (scalar))
449 return str_conv.
map (umap);
464 *(
reinterpret_cast<double *
>(where)) =
scalar;
charNDArray max(char d, const charNDArray &m)
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.
virtual octave_value map(unary_mapper_t) const
virtual octave_value convert_to_str(bool pad=false, bool force=false, char type='\'') const
void warn_load(const char *type) const
friend class octave_value
void warn_save(const char *type) const
static int static_type_id(void)
octave_value map(unary_mapper_t umap) const
bool fast_elem_insert_self(void *where, builtin_type_t btyp) const
octave_value as_uint32(void) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool load_ascii(std::istream &is)
type_conv_info numeric_demotion_function(void) const
octave_value as_uint8(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
octave_value convert_to_str_internal(bool pad, bool force, char type) const
double double_value(bool=false) const
octave_value as_int64(void) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
bool save_ascii(std::ostream &os)
octave_value as_uint64(void) const
octave_value as_single(void) const
octave_value diag(octave_idx_type m, octave_idx_type n) const
octave_value as_double(void) const
float float_value(bool=false) const
Matrix matrix_value(bool=false) const
mxArray * as_mxArray(void) const
octave_value as_int16(void) const
bool save_binary(std::ostream &os, bool save_as_floats)
octave_value as_int8(void) 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
octave_value as_uint16(void) const
octave_value as_int32(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
octave_value map(octave_base_value::unary_mapper_t umap) const
const octave_hdf5_id octave_H5P_DEFAULT
const octave_hdf5_id octave_H5S_ALL
void read_doubles(std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
void warning(const char *fmt,...)
void error(const char *fmt,...)
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
void octave_write_double(std::ostream &os, double d)
std::complex< double > erfc(std::complex< double > z, double relerr=0)
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
std::complex< double > erfi(std::complex< double > z, double relerr=0)
std::complex< double > erf(std::complex< double > z, double relerr=0)
Complex atan(const Complex &x)
Complex rc_acos(double x)
Complex log1p(const Complex &x)
Complex acos(const Complex &x)
Complex asin(const Complex &x)
Complex rc_log2(double x)
Complex erfc(const Complex &x)
Complex rc_sqrt(double x)
Complex rc_atanh(double x)
std::complex< T > ceil(const std::complex< T > &x)
Complex rc_acosh(double x)
Complex rc_log1p(double x)
Complex rc_log10(double x)
Complex rc_lgamma(double x)
Complex rc_asin(double x)
Complex log2(const Complex &x)
std::complex< T > floor(const std::complex< T > &x)
Complex erf(const Complex &x)
Complex expm1(const Complex &x)
void err_nan_to_character_conversion(void)
std::complex< double > Complex
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)
#define SCALAR_MAPPER(UMAP, FCN)
static octave_base_value * default_numeric_demotion_function(const octave_base_value &a)
octave_value::octave_value(const Array< char > &chm, char type) return retval