26 #if defined (HAVE_CONFIG_H)
64 "float complex scalar",
"single");
94 return tmp.
index_op (idx, resize_ok);
100 if (! force_conversion)
102 "complex scalar",
"real scalar");
110 if (! force_conversion)
112 "complex scalar",
"real scalar");
122 if (! force_conversion)
124 "complex scalar",
"real matrix");
136 if (! force_conversion)
138 "complex scalar",
"real matrix");
150 if (! force_conversion)
152 "complex scalar",
"real matrix");
164 if (! force_conversion)
166 "complex scalar",
"real matrix");
257 octave::write_value<FloatComplex> (os, c);
267 scalar = octave::read_value<FloatComplex> (is);
270 error (
"load: failed to load complex scalar constant");
278 char tmp =
static_cast<char> (
LS_FLOAT);
279 os.write (
reinterpret_cast<char *
> (&tmp), 1);
281 os.write (
reinterpret_cast<char *
> (&ctmp), 8);
291 if (! is.read (
reinterpret_cast<char *
> (&tmp), 1))
295 read_floats (is,
reinterpret_cast<float *
> (&ctmp),
296 static_cast<save_type> (tmp), 2, swap, fmt);
311 #if defined (HAVE_HDF5)
313 hsize_t dimens[3] = {0};
314 hid_t space_hid, type_hid, data_hid;
315 space_hid = type_hid = data_hid = -1;
317 space_hid = H5Screate_simple (0, dimens,
nullptr);
324 H5Sclose (space_hid);
327 #if defined (HAVE_HDF5_18)
328 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid,
336 H5Sclose (space_hid);
347 H5Sclose (space_hid);
350 octave_unused_parameter (loc_id);
351 octave_unused_parameter (name);
364 #if defined (HAVE_HDF5)
366 #if defined (HAVE_HDF5_18)
369 hid_t data_hid = H5Dopen (loc_id, name);
371 hid_t type_hid = H5Dget_type (data_hid);
377 H5Tclose (complex_type);
382 hid_t space_id = H5Dget_space (data_hid);
383 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
387 H5Tclose (complex_type);
403 H5Tclose (complex_type);
408 octave_unused_parameter (loc_id);
409 octave_unused_parameter (name);
447 #define SCALAR_MAPPER(UMAP, FCN) \
448 case umap_ ## UMAP: \
449 return octave_value (FCN (scalar))
ComplexColumnVector conj(const ComplexColumnVector &a)
N Dimensional Array with copy-on-write semantics.
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 * get_imag_data() const
virtual octave_value map(unary_mapper_t) const
void warn_load(const char *type) const
void warn_save(const char *type) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
bool load_ascii(std::istream &is)
FloatMatrix float_matrix_value(bool=false) const
octave_value as_double() const
bool save_ascii(std::ostream &os)
FloatComplexNDArray float_complex_array_value(bool=false) const
Complex complex_value(bool=false) const
NDArray array_value(bool=false) const
ComplexNDArray complex_array_value(bool=false) const
bool save_binary(std::ostream &os, bool save_as_floats)
octave_value map(unary_mapper_t umap) const
ComplexMatrix complex_matrix_value(bool=false) const
mxArray * as_mxArray(bool interleaved) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
octave_value diag(octave_idx_type m, octave_idx_type n) const
float float_value(bool=false) const
Matrix matrix_value(bool=false) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
double double_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
octave_value as_single() const
FloatNDArray float_array_value(bool=false) const
octave_base_value * try_narrowing_conversion()
FloatComplex float_complex_value(bool=false) const
octave_value resize(const dim_vector &dv, bool fill=false) const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
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
ColumnVector real(const ComplexColumnVector &a)
ColumnVector imag(const ComplexColumnVector &a)
void read_floats(std::istream &is, float *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
void() error(const char *fmt,...)
void warn_implicit_conversion(const char *id, const char *from, const char *to)
Complex log2(const Complex &x)
Complex asin(const Complex &x)
Complex acos(const Complex &x)
Complex atan(const Complex &x)
std::complex< T > floor(const std::complex< T > &x)
std::complex< T > ceil(const std::complex< T > &x)
Complex expm1(const Complex &x)
Complex log1p(const Complex &x)
octave_hdf5_id hdf5_make_complex_type(octave_hdf5_id num_type)
bool hdf5_types_compatible(octave_hdf5_id t1, octave_hdf5_id t2)
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)
std::complex< double > Complex
std::complex< float > FloatComplex
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
#define SCALAR_MAPPER(UMAP, FCN)
template int8_t abs(int8_t)