26 #if ! defined (octave_ov_scalar_h)
27 #define octave_ov_scalar_h 1
29 #include "octave-config.h"
77 bool resize_ok =
false);
79 type_conv_info numeric_demotion_function ()
const;
91 bool isreal ()
const {
return true; }
129 #define DEFINE_INT_SCALAR_VALUE(TYPE) \
131 TYPE ## _scalar_value () const \
133 return octave_ ## TYPE (scalar); \
145 #undef DEFINE_INT_SCALAR_VALUE
150 {
return static_cast<float> (scalar); }
155 {
return float_value (); }
158 {
return Matrix (1, 1, scalar); }
202 retval(0) =
static_cast<char> (scalar);
210 if (warn && scalar != 0 && scalar != 1)
220 if (warn && scalar != 0 && scalar != 1)
256 octave_value convert_to_str_internal (
bool pad,
bool force,
char type)
const;
262 bool save_ascii (std::ostream& os);
264 bool load_ascii (std::istream& is);
266 bool save_binary (std::ostream& os,
bool save_as_floats);
268 bool load_binary (std::istream& is,
bool swap,
271 bool save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
275 int write (octave::stream& os,
int block_size,
279 return os.write (
array_value (), block_size, output_type,
283 mxArray * as_mxArray (
bool interleaved)
const;
287 bool fast_elem_insert_self (
void *where,
builtin_type_t btyp)
const;
Vector representing the dimensions (size) of an Array.
FloatComplexMatrix float_complex_matrix_value(bool=false) const
octave::idx_vector index_vector(bool=false) const
FloatMatrix float_matrix_value(bool=false) const
FloatComplex float_complex_value(bool=false) const
octave_base_value * empty_clone() const
builtin_type_t builtin_type() const
uint16NDArray uint16_array_value() const
uint64NDArray uint64_array_value() const
boolNDArray bool_array_value(bool warn=false) const
int16NDArray int16_array_value() const
FloatComplexNDArray float_complex_array_value(bool=false) const
octave_value any(int=0) const
double double_value(bool=false) const
int32NDArray int32_array_value() const
bool maybe_update_double(double d)
FloatNDArray float_array_value(bool=false) const
ComplexMatrix complex_matrix_value(bool=false) const
NDArray array_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_scalar(const octave_scalar &s)
octave_base_value * clone() const
bool is_real_scalar() const
uint8NDArray uint8_array_value() const
float float_value(bool=false) const
SparseMatrix sparse_matrix_value(bool=false) const
Matrix matrix_value(bool=false) const
uint32NDArray uint32_array_value() const
charNDArray char_array_value(bool=false) const
double scalar_value(bool=false) const
bool is_double_type() const
Complex complex_value(bool=false) const
float float_scalar_value(bool=false) const
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
int64NDArray int64_array_value() const
int8NDArray int8_array_value() const
ComplexNDArray complex_array_value(bool=false) 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
intNDArray< octave_int16 > int16NDArray
intNDArray< octave_int32 > int32NDArray
intNDArray< octave_int64 > int64NDArray
intNDArray< octave_int8 > int8NDArray
void err_nan_to_logical_conversion()
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
std::complex< double > Complex
std::complex< float > FloatComplex
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
#define DEFINE_INT_SCALAR_VALUE(TYPE)
intNDArray< octave_uint16 > uint16NDArray
intNDArray< octave_uint32 > uint32NDArray
intNDArray< octave_uint64 > uint64NDArray
intNDArray< octave_uint8 > uint8NDArray