23 #if defined (HAVE_CONFIG_H)
62 "complex scalar",
"double");
79 return "subscripts must be real (forgot to initialize i or j?)";
85 return "Octave:invalid-index";
111 double im =
scalar.imag ();
141 std::ostringstream buf;
142 buf <<
scalar.real () << std::showpos <<
scalar.imag () <<
"i";
151 if (! force_conversion)
153 "complex scalar",
"real scalar");
161 if (! force_conversion)
163 "complex scalar",
"real scalar");
173 if (! force_conversion)
175 "complex scalar",
"real matrix");
187 if (! force_conversion)
189 "complex scalar",
"real matrix");
201 if (! force_conversion)
203 "complex scalar",
"real matrix");
215 if (! force_conversion)
217 "complex scalar",
"real matrix");
258 static_cast<FloatComplex> (
scalar));
317 scalar = octave_read_value<Complex> (
is);
320 error (
"load: failed to load complex scalar constant");
329 os.write (reinterpret_cast<char *> (&tmp), 1);
331 os.write (reinterpret_cast<char *> (&ctmp), 16);
341 if (! is.read (reinterpret_cast<char *> (&tmp), 1))
346 static_cast<save_type> (tmp), 2, swap, fmt);
361 #if defined (HAVE_HDF5)
364 hid_t space_hid, type_hid, data_hid;
365 space_hid = type_hid = data_hid = -1;
367 space_hid = H5Screate_simple (0, dimens, 0);
374 H5Sclose (space_hid);
377 #if defined (HAVE_HDF5_18)
378 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid,
385 H5Sclose (space_hid);
396 H5Sclose (space_hid);
399 octave_unused_parameter (loc_id);
400 octave_unused_parameter (name);
413 #if defined (HAVE_HDF5)
415 #if defined (HAVE_HDF5_18)
418 hid_t data_hid = H5Dopen (loc_id, name);
420 hid_t type_hid = H5Dget_type (data_hid);
426 H5Tclose (complex_type);
431 hid_t space_id = H5Dget_space (data_hid);
432 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
436 H5Tclose (complex_type);
451 H5Tclose (complex_type);
456 octave_unused_parameter (loc_id);
457 octave_unused_parameter (name);
470 double *pr =
static_cast<double *
> (retval->
get_data ());
484 #define SCALAR_MAPPER(UMAP, FCN) \
485 case umap_ ## UMAP: \
486 return octave_value (FCN (scalar))
idx_vector index_vector(bool=false) const
Octave interface to the compression and uncompression libraries.
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)
const octave_hdf5_id octave_H5S_ALL
static int static_type_id(void)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool save_ascii(std::ostream &os)
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)
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
double double_value(bool=false) const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
Complex acos(const Complex &x)
type_conv_info numeric_demotion_function(void) const
#define SCALAR_MAPPER(UMAP, FCN)
Complex asin(const Complex &x)
octave_value as_single(void) const
~complex_index_exception(void)
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.
std::string details(void) const
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
octave_value resize(const dim_vector &dv, bool fill=false) const
void warn_load(const char *type) const
ComplexColumnVector conj(const ComplexColumnVector &a)
Complex atan(const Complex &x)
ComplexNDArray complex_array_value(bool=false) const
void read_doubles(std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
nd deftypefn *octave_map m
octave_base_value * try_narrowing_conversion(void)
bool hdf5_types_compatible(octave_hdf5_id t1, octave_hdf5_id t2)
Matrix matrix_value(bool=false) const
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
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
void warn_save(const char *type) const
complex_index_exception(const std::string &value)
ComplexMatrix complex_matrix_value(bool=false) const
void * get_imag_data(void) const
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by nd tex zero divided by nd ifnottex and any operation involving another NaN value(5+NaN).Note that NaN always compares not equal to NaN(NaN!
void warn_implicit_conversion(const char *id, const char *from, const char *to)
NDArray array_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
octave_value as_double(void) const
virtual octave_value map(unary_mapper_t) const
FloatComplex float_complex_value(bool=false) const
bool load_ascii(std::istream &is)
ColumnVector imag(const ComplexColumnVector &a)
const octave_hdf5_id octave_H5P_DEFAULT
std::complex< float > FloatComplex
std::complex< double > Complex
const char * err_id(void) const
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)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Complex complex_value(bool=false) const
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)