23 #if defined (HAVE_CONFIG_H) 60 "float complex scalar",
"single");
91 return tmp.do_index_op (idx, resize_ok);
97 if (! force_conversion)
99 "complex scalar",
"real scalar");
107 if (! force_conversion)
109 "complex scalar",
"real scalar");
119 if (! force_conversion)
121 "complex scalar",
"real matrix");
133 if (! force_conversion)
135 "complex scalar",
"real matrix");
147 if (! force_conversion)
149 "complex scalar",
"real matrix");
161 if (! force_conversion)
163 "complex scalar",
"real matrix");
264 scalar = octave_read_value<FloatComplex> (
is);
267 error (
"load: failed to load complex scalar constant");
276 os.
write (reinterpret_cast<char *> (&
tmp), 1);
278 os.
write (reinterpret_cast<char *> (&ctmp), 8);
288 if (!
is.read (reinterpret_cast<char *> (&
tmp), 1))
293 static_cast<save_type> (
tmp), 2,
swap, fmt);
308 #if defined (HAVE_HDF5) 311 hid_t space_hid, type_hid, data_hid;
312 space_hid = type_hid = data_hid = -1;
314 space_hid = H5Screate_simple (0, dimens,
nullptr);
321 H5Sclose (space_hid);
324 #if defined (HAVE_HDF5_18) 325 data_hid = H5Dcreate (loc_id,
name, type_hid, space_hid,
332 H5Sclose (space_hid);
343 H5Sclose (space_hid);
346 octave_unused_parameter (loc_id);
347 octave_unused_parameter (
name);
360 #if defined (HAVE_HDF5) 362 #if defined (HAVE_HDF5_18) 365 hid_t data_hid = H5Dopen (loc_id,
name);
367 hid_t type_hid = H5Dget_type (data_hid);
373 H5Tclose (complex_type);
378 hid_t space_id = H5Dget_space (data_hid);
379 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
383 H5Tclose (complex_type);
399 H5Tclose (complex_type);
404 octave_unused_parameter (loc_id);
405 octave_unused_parameter (
name);
418 float *pr =
static_cast<float *
> (
retval->get_data ());
419 float *
pi =
static_cast<float *
> (
retval->get_imag_data ());
432 #define SCALAR_MAPPER(UMAP, FCN) \ 433 case umap_ ## UMAP: \ 434 return octave_value (FCN (scalar)) octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, mach_info::float_format flt_fmt)
octave_base_value * try_narrowing_conversion(void)
ComplexNDArray complex_array_value(bool=false) const
float float_value(bool=false) const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
#define SCALAR_MAPPER(UMAP, FCN)
std::complex< double > erfi(std::complex< double > z, double relerr=0)
const octave_hdf5_id octave_H5S_ALL
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the base of natural logarithms The constant ex $e satisfies the equation log(e)
std::complex< T > ceil(const std::complex< T > &x)
void error(const char *fmt,...)
std::complex< T > floor(const std::complex< T > &x)
Complex complex_value(bool=false) const
octave_value as_single(void) const
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
Complex acos(const Complex &x)
Complex atan(const Complex &x)
octave_value diag(octave_idx_type m, octave_idx_type n) const
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
void read_floats(std::istream &is, float *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
Complex asin(const Complex &x)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Complex log2(const Complex &x)
Complex erfc(const Complex &x)
std::complex< double > erf(std::complex< double > z, double relerr=0)
virtual octave_value map(unary_mapper_t) const
octave_value resize(const dim_vector &dv, bool fill=false) const
void warn_load(const char *type) const
FloatComplexNDArray float_complex_array_value(bool=false) const
FloatComplex float_complex_value(bool=false) const
Complex expm1(const Complex &x)
FloatNDArray float_array_value(bool=false) const
ComplexColumnVector conj(const ComplexColumnVector &a)
nd deftypefn *std::string name
bool load_ascii(std::istream &is)
Matrix matrix_value(bool=false) const
Complex log1p(const Complex &x)
bool hdf5_types_compatible(octave_hdf5_id t1, octave_hdf5_id t2)
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
void warn_save(const char *type) const
bool save_ascii(std::ostream &os)
Complex erf(const Complex &x)
ComplexMatrix complex_matrix_value(bool=false) const
FloatMatrix float_matrix_value(bool=false) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
mxArray * as_mxArray(void) const
double double_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
void warn_implicit_conversion(const char *id, const char *from, const char *to)
octave_value as_double(void) const
NDArray array_value(bool=false) const
ColumnVector imag(const ComplexColumnVector &a)
const octave_hdf5_id octave_H5P_DEFAULT
octave_value map(unary_mapper_t umap) const
std::complex< float > FloatComplex
bool save_binary(std::ostream &os, bool &save_as_floats)
std::complex< double > Complex
void octave_write_float_complex(std::ostream &os, const FloatComplex &c)
ColumnVector real(const ComplexColumnVector &a)
write the output to stdout if nargout is
Vector representing the dimensions (size) of an Array.
octave_hdf5_id hdf5_make_complex_type(octave_hdf5_id num_type)
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
std::complex< double > erfc(std::complex< double > z, double relerr=0)