26 #if ! defined (octave_ov_magic_int_h)
27 #define octave_ov_magic_int_h 1
29 #include "octave-config.h"
77 bool resize_ok =
false);
91 bool isreal (
void)
const {
return true; }
95 bool isfloat (
void)
const {
return true; }
147 return scalar_ref ().double_value ();
151 {
return static_cast<float> (double_value ()); }
154 {
return double_value (); }
157 {
return float_value (); }
160 {
return Matrix (1, 1, double_value ()); }
204 retval(0) =
static_cast<char> (double_value ());
210 if (warn && scalar_ref () != T (0) && scalar_ref () != T (1))
213 return double_value ();
218 if (warn && scalar_ref () != T (0) && scalar_ref () != T (1))
244 octave_value convert_to_str_internal (
bool pad,
bool force,
char type)
const;
250 bool save_ascii (std::ostream& os);
252 bool load_ascii (std::istream& is);
254 bool save_binary (std::ostream& os,
bool save_as_floats);
256 bool load_binary (std::istream& is,
bool swap,
259 bool save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
263 int write (octave::stream& os,
int block_size,
267 return os.write (
array_value (), block_size, output_type,
271 mxArray * as_mxArray (
bool interleaved)
const;
295 type_conv_info numeric_conversion_function (
void)
const;
321 type_conv_info numeric_conversion_function (
void)
const;
Vector representing the dimensions (size) of an Array.
octave_base_magic_int(void)
Complex complex_value(bool=false) const
boolNDArray bool_array_value(bool warn=false) const
ComplexMatrix complex_matrix_value(bool=false) const
octave_uint64 uint64_scalar_value(void) const
double scalar_value(bool=false) const
builtin_type_t builtin_type(void) const
ComplexNDArray complex_array_value(bool=false) const
const T & scalar_ref(void) const
bool is_magic_int(void) const
~octave_base_magic_int(void)=default
octave_int8 int8_scalar_value(void) const
FloatNDArray float_array_value(bool=false) const
int8NDArray int8_array_value(void) const
octave_int16 int16_scalar_value(void) const
FloatComplexNDArray float_complex_array_value(bool=false) const
int16NDArray int16_array_value(void) const
float float_scalar_value(bool=false) const
int32NDArray int32_array_value(void) const
bool bool_value(bool warn=false) const
FloatComplex float_complex_value(bool=false) const
uint64NDArray uint64_array_value(void) const
uint8NDArray uint8_array_value(void) const
bool is_real_scalar(void) const
charNDArray char_array_value(bool=false) const
uint16NDArray uint16_array_value(void) const
octave_base_value * empty_clone(void) const
octave_base_magic_int(const T &val)
int64NDArray int64_array_value(void) const
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
FloatMatrix float_matrix_value(bool=false) const
octave_int64 int64_scalar_value(void) const
bool is_storable(void) const
octave_value any(int=0) const
bool is_double_type(void) const
octave_uint32 uint32_scalar_value(void) const
float float_value(bool=false) const
NDArray array_value(bool=false) const
octave_uint8 uint8_scalar_value(void) const
SparseMatrix sparse_matrix_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
Matrix matrix_value(bool=false) const
double double_value(bool=false) 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
octave_int32 int32_scalar_value(void) const
uint32NDArray uint32_array_value(void) const
octave_uint16 uint16_scalar_value(void) const
octave_magic_int(const octave_int64 &val)
~octave_magic_int(void)=default
octave_base_value * clone(void) const
~octave_magic_uint(void)=default
octave_magic_uint(const octave_uint64 &val)
octave_base_value * clone(void) const
void resize(octave_idx_type n, const octave_value &rfv=octave_value())
Array< octave_value > array_value(void) const
void warn_logical_conversion(void)
octave::idx_vector idx_vector
intNDArray< octave_int16 > int16NDArray
intNDArray< octave_int32 > int32NDArray
intNDArray< octave_int64 > int64NDArray
intNDArray< octave_int8 > int8NDArray
class OCTAVE_API boolNDArray
class OCTAVE_API ComplexMatrix
class OCTAVE_API SparseMatrix
class OCTAVE_API FloatComplexMatrix
class OCTAVE_API FloatMatrix
class OCTAVE_API ComplexNDArray
class OCTAVE_API SparseComplexMatrix
class OCTAVE_API FloatComplexNDArray
class OCTAVE_API FloatNDArray
std::complex< double > Complex
std::complex< float > FloatComplex
octave_int< uint32_t > octave_uint32
octave_int< int32_t > octave_int32
octave_int< int16_t > octave_int16
octave_int< int8_t > octave_int8
octave_int< int64_t > octave_int64
octave_int< uint64_t > octave_uint64
octave_int< uint16_t > octave_uint16
octave_int< uint8_t > octave_uint8
static double as_double(OCTAVE_TIME_T sec, long usec)
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
intNDArray< octave_uint16 > uint16NDArray
intNDArray< octave_uint32 > uint32NDArray
intNDArray< octave_uint64 > uint64NDArray
intNDArray< octave_uint8 > uint8NDArray