125 ::warning (
"range error for conversion to character value");
128 retval =
octave_value (std::string (1, static_cast<char> (ival)), type);
149 scalar = octave_read_value<float> (is);
152 error (
"load: failed to load scalar constant");
163 os.write (reinterpret_cast<char *> (&tmp), 1);
165 os.write (reinterpret_cast<char *> (&dtmp), 4);
175 if (! is.read (reinterpret_cast<char *> (&tmp), 1))
179 read_floats (is, &dtmp, static_cast<save_type> (tmp), 1, swap, fmt);
193 #if defined (HAVE_HDF5)
196 hid_t space_hid, data_hid;
197 space_hid = data_hid = -1;
199 space_hid = H5Screate_simple (0, dimens, 0);
200 if (space_hid < 0)
return false;
202 data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_FLOAT, space_hid,
203 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
205 data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_FLOAT, space_hid,
210 H5Sclose (space_hid);
215 retval = H5Dwrite (data_hid, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
216 H5P_DEFAULT, &tmp) >= 0;
219 H5Sclose (space_hid);
231 #if defined (HAVE_HDF5)
234 hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
236 hid_t data_hid = H5Dopen (loc_id, name);
238 hid_t space_id = H5Dget_space (data_hid);
240 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
249 if (H5Dread (data_hid, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
250 H5P_DEFAULT, &dtmp) < 0)
273 float *pr =
static_cast<float *
> (retval->
get_data ());
292 #define SCALAR_MAPPER(UMAP, FCN) \
293 case umap_ ## UMAP: \
294 return octave_value (FCN (scalar))
376 *(
reinterpret_cast<float *
>(where)) =
scalar;
octave_value convert_to_str_internal(bool pad, bool force, char type) const
Complex rc_asin(double x)
octave_value resize(const dim_vector &dv, bool fill=false) const
std::complex< double > erfi(std::complex< double > z, double relerr=0)
void gripe_load(const char *type) const
Complex rc_acos(double x)
void error(const char *fmt,...)
void * get_data(void) const
octave_value map(octave_base_value::unary_mapper_t umap) const
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
void gripe_save(const char *type) const
bool load_ascii(std::istream &is)
octave_value diag(octave_idx_type m, octave_idx_type n) const
FloatMatrix float_matrix_value(bool=false) const
float float_value(bool=false) const
bool save_ascii(std::ostream &os)
std::complex< double > erf(std::complex< double > z, double relerr=0)
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
F77_RET_T const double const double double * d
subroutine xgamma(x, result)
Complex rc_log1p(double x)
Complex rc_lgamma(double x)
std::complex< T > ceil(const std::complex< T > &x)
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Complex rc_sqrt(double x)
void gripe_nan_to_character_conversion(void)
Complex rc_log2(double x)
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
Complex rc_atanh(double x)
octave_value map(unary_mapper_t umap) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
Complex rc_log10(double x)
friend class octave_value
void warning(const char *fmt,...)
charNDArray max(char d, const charNDArray &m)
Complex rc_acosh(double x)
void octave_write_float(std::ostream &os, float d)
#define SCALAR_MAPPER(UMAP, FCN)
mxArray * as_mxArray(void) const
virtual octave_value map(unary_mapper_t) const
Complex asin(const Complex &x)
std::complex< float > FloatComplex
std::complex< T > floor(const std::complex< T > &x)
bool load_binary(std::istream &is, bool swap, oct_mach_info::float_format fmt)
bool fast_elem_insert_self(void *where, builtin_type_t btyp) const
Complex acos(const Complex &x)
bool save_binary(std::ostream &os, bool &save_as_floats)
virtual octave_value convert_to_str(bool pad=false, bool force=false, char type= '\'') const
Complex atan(const Complex &x)
void read_floats(std::istream &is, float *data, save_type type, octave_idx_type len, bool swap, oct_mach_info::float_format fmt)
bool octave_is_NA(double x)
std::complex< double > erfc(std::complex< double > z, double relerr=0)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)