108 type_name (),
"real scalar");
110 retval = matrix(0).double_value ();
127 type_name (),
"real scalar");
129 retval = matrix(0).float_value ();
148 error (
"invalid conversion of %s to Matrix", type_name ().c_str ());
151 retval =
Matrix (dv(0), dv(1));
155 vec[i] = matrix(i).double_value ();
166 error (
"invalid conversion of %s to FloatMatrix", type_name ().c_str ());
173 vec[i] = matrix(i).float_value ();
184 error (
"invalid conversion of %s to Matrix", type_name ().c_str ());
191 vec[i] =
Complex (matrix(i).double_value ());
202 error (
"invalid conversion of %s to FloatMatrix", type_name ().c_str ());
217 NDArray retval (matrix.dims ());
221 vec[i] = matrix(i).double_value ();
232 vec[i] = matrix(i).float_value ();
243 vec[i] =
Complex (matrix(i).double_value ());
265 if (warn && matrix.any_element_not_one_or_zero ())
270 vec[i] = matrix(i).bool_value ();
284 vec[i] = matrix(i).char_value ();
302 matrix_ref ().changesign ();
307 return idx_cache ? *idx_cache : set_idx_cache (
idx_vector (matrix));
313 {
return os.
write (matrix, block_size, output_type, skip, flt_fmt); }
323 OCTAVE_INT_T::val_type *pr =
static_cast<OCTAVE_INT_T::val_type *
>
330 for (
mwIndex i = 0; i < nel; i++)
331 pr[i] = p[i].value ();
341 return matrix.
abs ();
403 bool resize_ok =
false)
511 {
return scalar.float_value (); }
517 retval(0,0) =
scalar.double_value ();
525 retval(0,0) =
scalar.float_value ();
549 retval(0) =
scalar.double_value ();
557 retval(0) =
scalar.float_value ();
582 return scalar.bool_value ();
593 retval(0) =
scalar.bool_value ();
602 retval(0) =
scalar.char_value ();
623 block_size, output_type, skip, flt_fmt);
634 OCTAVE_INT_T::val_type *pr =
static_cast<OCTAVE_INT_T::val_type *
>
void gripe_implicit_conversion(const char *id, const char *from, const char *to)
octave_int< uint32_t > octave_uint32
double double_value(bool=false) const
float float_scalar_value(bool=false) const
builtin_type_t builtin_type(void) const
void * mex_get_data(void) const
bool bool_value(bool warn=false) const
double double_value(bool=false) const
intNDArray< octave_int64 > int64NDArray
FloatMatrix float_matrix_value(bool=false) const
FloatNDArray float_array_value(bool=false) const
FloatComplexNDArray float_complex_array_value(bool=false) const
OCTAVE_VALUE_INT_SCALAR_T(void)
uint16NDArray uint16_array_value(void) const
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, octave_idx_type skip, oct_mach_info::float_format flt_fmt) const
intNDArray< octave_uint32 > uint32NDArray
double scalar_value(bool=false) const
intNDArray< octave_uint8 > uint8NDArray
intNDArray< octave_uint16 > uint16NDArray
ComplexMatrix complex_matrix_value(bool=false) const
~OCTAVE_VALUE_INT_SCALAR_T(void)
void error(const char *fmt,...)
bool is_integer_type(void) const
octave_int< int16_t > octave_int16
void * get_data(void) const
bool OCTAVE_TYPE_PREDICATE_FUNCTION(void) const
octave_value map(unary_mapper_t umap) const
FloatComplexNDArray float_complex_array_value(bool=false) const
ComplexNDArray complex_array_value(bool=false) const
uint8NDArray uint8_array_value(void) const
double lo_ieee_nan_value(void)
intNDArray< octave_int16 > int16NDArray
uint8NDArray uint8_array_value(void) const
uint32NDArray uint32_array_value(void) const
octave_value map(unary_mapper_t umap) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
octave_value signum(void) const
ComplexNDArray complex_array_value(bool=false) const
int8NDArray int8_array_value(void) const
builtin_type_t builtin_type(void) const
octave_uint32 uint32_scalar_value(void) const
octave_value map(unary_mapper_t umap) const
octave_int< int32_t > octave_int32
FloatComplexMatrix float_complex_matrix_value(bool=false) const
void * mex_get_data(void) const
#define OCTAVE_VALUE_INT_SCALAR_T
uint64NDArray uint64_array_value(void) const
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
octave_int< uint16_t > octave_uint16
int64NDArray int64_array_value(void) const
NDArray array_value(bool=false) const
intNDArray< octave_int8 > int8NDArray
octave_base_value * clone(void) const
octave_uint16 uint16_scalar_value(void) const
octave_uint64 uint64_scalar_value(void) const
float float_value(bool=false) const
~OCTAVE_VALUE_INT_MATRIX_T(void)
int32NDArray int32_array_value(void) const
octave_int< int64_t > octave_int64
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, oct_mach_info::float_format flt_fmt) const
ComplexMatrix complex_matrix_value(bool=false) const
uint16NDArray uint16_array_value(void) const
int8NDArray int8_array_value(void) const
Matrix matrix_value(bool=false) const
Matrix matrix_value(bool=false) const
int64NDArray int64_array_value(void) const
OCTAVE_VALUE_INT_MATRIX_T(const Array< OCTAVE_INT_T > &nda)
octave_value abs(void) const
bool OCTAVE_TYPE_PREDICATE_FUNCTION(void) const
#define OCTAVE_VALUE_INT_MATRIX_T
octave_int< uint64_t > octave_uint64
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
octave_base_value * empty_clone(void) const
octave_int32 int32_scalar_value(void) const
octave_int16 int16_scalar_value(void) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
float lo_ieee_float_nan_value(void)
float float_value(bool=false) const
mxArray * as_mxArray(void) const
#define OCTAVE_INT_MX_CLASS
octave_int8 int8_scalar_value(void) const
FloatMatrix float_matrix_value(bool=false) const
OCTAVE_VALUE_INT_SCALAR_T(const OCTAVE_INT_T &nda)
NDArray array_value(bool=false) const
boolNDArray bool_array_value(bool warn=false) const
intNDArray< octave_int32 > int32NDArray
boolNDArray bool_array_value(bool warn=false) const
void gripe_logical_conversion(void)
float float_scalar_value(bool=false) const
#define OCTAVE_VALUE_INT_NDARRAY_EXTRACTOR_FUNCTION
void gripe_invalid_conversion(const std::string &from, const std::string &to)
uint32NDArray uint32_array_value(void) const
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, oct_mach_info::float_format flt_fmt)
int16NDArray int16_array_value(void) const
octave_base_value * clone(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
FloatNDArray float_array_value(bool=false) const
charNDArray char_array_value(bool=false) const
bool is_integer_type(void) const
std::complex< float > FloatComplex
int16NDArray int16_array_value(void) const
charNDArray char_array_value(bool=false) const
octave_value map(unary_mapper_t umap) const
std::complex< double > Complex
const T * fortran_vec(void) const
OCTAVE_VALUE_INT_MATRIX_T(void)
octave_int< uint8_t > octave_uint8
octave_int64 int64_scalar_value(void) const
octave_int< int8_t > octave_int8
OCTAVE_VALUE_INT_MATRIX_T(const intNDArray< OCTAVE_INT_T > &nda)
octave_uint8 uint8_scalar_value(void) const
idx_vector index_vector(bool=false) const
int32NDArray int32_array_value(void) const
mxArray * as_mxArray(void) const
uint64NDArray uint64_array_value(void) const
double scalar_value(bool=false) const
idx_vector index_vector(bool=false) const
static bool scalar(const dim_vector &dims)
intNDArray< octave_uint64 > uint64NDArray
octave_base_value * empty_clone(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)