26 #if ! defined (octave_ov_complex_h)
27 #define octave_ov_complex_h 1
29 #include "octave-config.h"
77 type_conv_info numeric_demotion_function ()
const;
82 bool resize_ok =
false);
89 return (scalar !=
Complex (0, 0)
104 OCTINTERP_API
double double_value (
bool =
false)
const;
106 OCTINTERP_API
float float_value (
bool =
false)
const;
109 {
return double_value (frc_str_conv); }
112 {
return float_value (frc_str_conv); }
114 OCTINTERP_API
Matrix matrix_value (
bool =
false)
const;
116 OCTINTERP_API
FloatMatrix float_matrix_value (
bool =
false)
const;
120 OCTINTERP_API
FloatNDArray float_array_value (
bool =
false)
const;
131 OCTINTERP_API
Complex complex_value (
bool =
false)
const;
133 OCTINTERP_API
FloatComplex float_complex_value (
bool =
false)
const;
135 OCTINTERP_API
ComplexMatrix complex_matrix_value (
bool =
false)
const;
138 float_complex_matrix_value (
bool =
false)
const;
140 OCTINTERP_API
ComplexNDArray complex_array_value (
bool =
false)
const;
143 float_complex_array_value (
bool =
false)
const;
149 if (warn && scalar != 0.0 && scalar != 1.0)
152 return scalar != 0.0;
159 if (warn && scalar != 0.0 && scalar != 1.0)
179 OCTINTERP_API
bool save_ascii (std::ostream& os);
181 OCTINTERP_API
bool load_ascii (std::istream& is);
183 OCTINTERP_API
bool save_binary (std::ostream& os,
bool save_as_floats);
186 load_binary (std::istream& is,
bool swap,
190 save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
192 OCTINTERP_API
bool load_hdf5 (
octave_hdf5_id loc_id,
const char *name);
194 int write (octave::stream& os,
int block_size,
199 return os.write (
array_value (
true), block_size, output_type,
203 OCTINTERP_API
mxArray * as_mxArray (
bool interleaved)
const;
205 OCTINTERP_API
octave_value map (unary_mapper_t umap)
const;
Vector representing the dimensions (size) of an Array.
octave_complex(const Complex &c)
float float_scalar_value(bool frc_str_conv=false) const
SparseMatrix sparse_matrix_value(bool=false) const
octave_complex(const octave_complex &c)
~octave_complex()=default
bool is_double_type() const
builtin_type_t builtin_type() const
boolNDArray bool_array_value(bool warn=false) const
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
double scalar_value(bool frc_str_conv=false) const
octave_value any(int=0) const
octave_base_value * clone() const
octave_base_value * empty_clone() const
int write(octave::stream &os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const
bool is_complex_scalar() const
bool bool_value(bool warn=false) const
void resize(octave_idx_type n, const octave_value &rfv=octave_value())
Array< octave_value > array_value() const
void warn_logical_conversion()
octave::idx_vector idx_vector
void err_nan_to_logical_conversion()
std::complex< double > Complex
std::complex< float > FloatComplex
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
octave_complex octave_complex_scalar