26#if defined (HAVE_CONFIG_H)
39 "complex diagonal matrix",
"double");
54 (default_numeric_conversion_function,
104 if (! force_conversion)
118 if (! force_conversion)
183 os.write (
reinterpret_cast<char *
> (&r), 4);
184 os.write (
reinterpret_cast<char *
> (&c), 4);
192 warning (
"save: some values too large to save as floats --");
193 warning (
"save: saving as doubles instead");
200 double max_val, min_val;
202 st = octave::get_save_type (max_val, min_val);
206 write_doubles (os,
reinterpret_cast<const double *
> (mtmp), st,
214 octave::mach_info::float_format fmt)
218 if (! (is.read (
reinterpret_cast<char *
> (&r), 4)
219 && is.read (
reinterpret_cast<char *
> (&c), 4)
220 && is.read (
reinterpret_cast<char *
> (&tmp), 1)))
243octave_complex_diag_matrix::chk_valid_scalar (
const octave_value& val,
void swap_bytes< 4 >(void *ptr)
Array< U, A > map(F fcn) const
Apply function fcn to each element of the Array<T, Alloc>.
const T * data() const
Size of the specified dimension.
octave_idx_type numel() const
Number of elements in the array.
bool all_elements_are_real() const
ComplexColumnVector extract_diag(octave_idx_type k=0) const
bool all_integers(double &max_val, double &min_val) const
bool too_large_for_float() const
octave_idx_type nelem() const
octave_idx_type rows() const
octave_idx_type length() const
octave_idx_type columns() const
octave_idx_type cols() const
ComplexMatrix complex_matrix_value(bool=false) const
octave_value to_dense() const
ComplexDiagMatrix m_matrix
virtual octave_base_value * try_narrowing_conversion()
octave_value as_single() const
DiagMatrix diag_matrix_value(bool=false) const
ComplexDiagMatrix complex_diag_matrix_value(bool=false) const
FloatComplexDiagMatrix float_complex_diag_matrix_value(bool=false) const
octave_value as_double() const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
FloatDiagMatrix float_diag_matrix_value(bool=false) const
octave_value map(unary_mapper_t umap) const
bool save_binary(std::ostream &os, bool save_as_floats)
std::string type_name() const
type_conv_info numeric_demotion_function() const
type_conv_info numeric_conversion_function() const
octave_base_value * try_narrowing_conversion()
static int static_type_id()
static int static_type_id()
bool is_real_scalar() const
Complex complex_value(bool frc_str_conv=false) const
bool is_complex_scalar() const
octave_value map(octave_base_value::unary_mapper_t umap) const
ColumnVector real(const ComplexColumnVector &a)
void read_doubles(std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
void write_doubles(std::ostream &os, const double *data, save_type type, octave_idx_type len)
void warning(const char *fmt,...)
void warn_implicit_conversion(const char *id, const char *from, const char *to)
F77_RET_T const F77_DBLE * x
std::complex< double > Complex
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)