56 "complex scalar",
"double");
110 if (! force_conversion)
112 "complex scalar",
"real scalar");
124 if (! force_conversion)
126 "complex scalar",
"real scalar");
138 if (! force_conversion)
140 "complex scalar",
"real matrix");
152 if (! force_conversion)
154 "complex scalar",
"real matrix");
166 if (! force_conversion)
168 "complex scalar",
"real matrix");
180 if (! force_conversion)
182 "complex scalar",
"real matrix");
223 static_cast<FloatComplex> (
scalar));
270 scalar = octave_read_value<Complex> (is);
274 error (
"load: failed to load complex scalar constant");
285 char tmp =
static_cast<char> (
LS_DOUBLE);
286 os.write (reinterpret_cast<char *> (&tmp), 1);
288 os.write (reinterpret_cast<char *> (&ctmp), 16);
298 if (! is.read (reinterpret_cast<char *> (&tmp), 1))
303 static_cast<save_type> (tmp), 2, swap, fmt);
317 #if defined (HAVE_HDF5)
320 hid_t space_hid, type_hid, data_hid;
321 space_hid = type_hid = data_hid = -1;
323 space_hid = H5Screate_simple (0, dimens, 0);
330 H5Sclose (space_hid);
334 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid,
335 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
337 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid, H5P_DEFAULT);
341 H5Sclose (space_hid);
347 retval = H5Dwrite (data_hid, type_hid, H5S_ALL, H5S_ALL, H5P_DEFAULT,
352 H5Sclose (space_hid);
366 #if defined (HAVE_HDF5)
369 hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
371 hid_t data_hid = H5Dopen (loc_id, name);
373 hid_t type_hid = H5Dget_type (data_hid);
379 H5Tclose (complex_type);
384 hid_t space_id = H5Dget_space (data_hid);
385 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
389 H5Tclose (complex_type);
397 if (H5Dread (data_hid, complex_type, H5S_ALL, H5S_ALL, H5P_DEFAULT,
404 H5Tclose (complex_type);
420 double *pr =
static_cast<double *
> (retval->
get_data ());
421 double *pi =
static_cast<double *
> (retval->
get_imag_data ());
434 #define SCALAR_MAPPER(UMAP, FCN) \
435 case umap_ ## UMAP: \
436 return octave_value (FCN (scalar))
void gripe_implicit_conversion(const char *id, const char *from, const char *to)
bool hdf5_types_compatible(hid_t t1, hid_t t2)
bool save_binary(std::ostream &os, bool &save_as_floats)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
octave_value diag(octave_idx_type m, octave_idx_type n) const
static octave_base_value * default_numeric_demotion_function(const octave_base_value &a)
std::complex< double > erfi(std::complex< double > z, double relerr=0)
void gripe_load(const char *type) const
static int static_type_id(void)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool save_ascii(std::ostream &os)
void octave_write_complex(std::ostream &os, const Complex &c)
void error(const char *fmt,...)
mxArray * as_mxArray(void) const
FloatComplexNDArray float_complex_array_value(bool=false) const
void * get_data(void) const
bool load_binary(std::istream &is, bool swap, oct_mach_info::float_format fmt)
double double_value(bool=false) const
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
void gripe_save(const char *type) const
type_conv_info numeric_demotion_function(void) const
#define SCALAR_MAPPER(UMAP, FCN)
std::complex< double > erf(std::complex< double > z, double relerr=0)
FloatNDArray float_array_value(bool=false) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
octave_value resize(const dim_vector &dv, bool fill=false) const
hid_t hdf5_make_complex_type(hid_t num_type)
ComplexColumnVector conj(const ComplexColumnVector &a)
ComplexNDArray complex_array_value(bool=false) const
octave_base_value * try_narrowing_conversion(void)
Matrix matrix_value(bool=false) const
std::complex< T > ceil(const std::complex< T > &x)
float float_value(bool=false) const
FloatMatrix float_matrix_value(bool=false) const
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
octave_value map(unary_mapper_t umap) const
void read_doubles(std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, oct_mach_info::float_format fmt)
ComplexMatrix complex_matrix_value(bool=false) const
void * get_imag_data(void) const
NDArray array_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
virtual octave_value map(unary_mapper_t) const
FloatComplex float_complex_value(bool=false) const
Complex asin(const Complex &x)
bool load_ascii(std::istream &is)
ColumnVector imag(const ComplexColumnVector &a)
std::complex< float > FloatComplex
std::complex< T > floor(const std::complex< T > &x)
std::complex< double > Complex
Complex acos(const Complex &x)
ColumnVector real(const ComplexColumnVector &a)
Complex atan(const Complex &x)
Complex complex_value(bool=false) const
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)