56 "float complex scalar",
"single");
95 if (! force_conversion)
97 "complex scalar",
"real scalar");
109 if (! force_conversion)
111 "complex scalar",
"real scalar");
123 if (! force_conversion)
125 "complex scalar",
"real matrix");
137 if (! force_conversion)
139 "complex scalar",
"real matrix");
151 if (! force_conversion)
153 "complex scalar",
"real matrix");
165 if (! force_conversion)
167 "complex scalar",
"real matrix");
256 scalar = octave_read_value<FloatComplex> (is);
260 error (
"load: failed to load complex scalar constant");
271 char tmp =
static_cast<char> (
LS_FLOAT);
272 os.write (reinterpret_cast<char *> (&tmp), 1);
274 os.write (reinterpret_cast<char *> (&ctmp), 8);
284 if (! is.read (reinterpret_cast<char *> (&tmp), 1))
288 read_floats (is, reinterpret_cast<float *> (&ctmp),
289 static_cast<save_type> (tmp), 2, swap, fmt);
303 #if defined (HAVE_HDF5)
306 hid_t space_hid, type_hid, data_hid;
307 space_hid = type_hid = data_hid = -1;
309 space_hid = H5Screate_simple (0, dimens, 0);
316 H5Sclose (space_hid);
320 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid,
321 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
323 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid, H5P_DEFAULT);
327 H5Sclose (space_hid);
333 retval = H5Dwrite (data_hid, type_hid, H5S_ALL, H5S_ALL, H5P_DEFAULT,
338 H5Sclose (space_hid);
352 #if defined (HAVE_HDF5)
355 hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
357 hid_t data_hid = H5Dopen (loc_id, name);
359 hid_t type_hid = H5Dget_type (data_hid);
365 H5Tclose (complex_type);
370 hid_t space_id = H5Dget_space (data_hid);
371 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
375 H5Tclose (complex_type);
383 if (H5Dread (data_hid, complex_type, H5S_ALL, H5S_ALL, H5P_DEFAULT,
390 H5Tclose (complex_type);
406 float *pr =
static_cast<float *
> (retval->
get_data ());
420 #define SCALAR_MAPPER(UMAP, FCN) \
421 case umap_ ## UMAP: \
422 return octave_value (FCN (scalar))
octave_base_value * try_narrowing_conversion(void)
void gripe_implicit_conversion(const char *id, const char *from, const char *to)
ComplexNDArray complex_array_value(bool=false) const
bool hdf5_types_compatible(hid_t t1, hid_t t2)
ComplexMatrix complex_matrix_value(bool=false) const
float float_value(bool=false) const
#define SCALAR_MAPPER(UMAP, FCN)
std::complex< double > erfi(std::complex< double > z, double relerr=0)
void gripe_load(const char *type) const
bool load_binary(std::istream &is, bool swap, oct_mach_info::float_format fmt)
void error(const char *fmt,...)
void * get_data(void) const
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
void gripe_save(const char *type) const
NDArray array_value(bool=false) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Complex complex_value(bool=false) const
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.
octave_value diag(octave_idx_type m, octave_idx_type n) const
hid_t hdf5_make_complex_type(hid_t num_type)
ComplexColumnVector conj(const ComplexColumnVector &a)
Matrix matrix_value(bool=false) const
bool load_ascii(std::istream &is)
std::complex< T > ceil(const std::complex< T > &x)
FloatComplexMatrix float_complex_matrix_value(bool=false) const
octave_value resize(const dim_vector &dv, bool fill=false) const
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool save_ascii(std::ostream &os)
FloatMatrix float_matrix_value(bool=false) const
FloatComplexNDArray float_complex_array_value(bool=false) const
double double_value(bool=false) const
FloatComplex float_complex_value(bool=false) const
octave_value map(unary_mapper_t umap) const
void * get_imag_data(void) const
virtual octave_value map(unary_mapper_t) const
Complex asin(const Complex &x)
ColumnVector imag(const ComplexColumnVector &a)
std::complex< float > FloatComplex
std::complex< T > floor(const std::complex< T > &x)
bool save_binary(std::ostream &os, bool &save_as_floats)
std::complex< double > Complex
FloatNDArray float_array_value(bool=false) const
void octave_write_float_complex(std::ostream &os, const FloatComplex &c)
Complex acos(const Complex &x)
ColumnVector real(const ComplexColumnVector &a)
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
mxArray * as_mxArray(void) 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)