31 #include "octave-config.h"
118 type_name (),
"real scalar");
120 retval = matrix(0).double_value ();
134 type_name (),
"real scalar");
136 retval = matrix(0).float_value ();
151 error (
"invalid conversion of %s to Matrix", type_name ().c_str ());
157 vec[i] = matrix(i).double_value ();
168 error (
"invalid conversion of %s to FloatMatrix", type_name ().c_str ());
174 vec[i] = matrix(i).float_value ();
185 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 ());
220 vec[i] = matrix(i).double_value ();
231 vec[i] = matrix(i).float_value ();
242 vec[i] =
Complex (matrix(i).double_value ());
264 if (warn && matrix.any_element_not_one_or_zero ())
269 vec[i] = matrix(i).bool_value ();
283 vec[i] = matrix(i).char_value ();
301 matrix_ref ().changesign ();
306 return idx_cache ? *idx_cache : set_idx_cache (
idx_vector (matrix));
312 {
return os.
write (matrix, block_size, output_type, skip, flt_fmt); }
322 OCTAVE_INT_T::val_type *pr =
static_cast<OCTAVE_INT_T::val_type *
>
329 for (
mwIndex i = 0; i < nel; i++)
330 pr[i] = p[i].value ();
340 return matrix.
abs ();
376 return save_hdf5_internal (loc_id, hdf5_save_type,
name, flag);
381 return load_hdf5_internal (loc_id, hdf5_save_type,
name);
413 bool resize_ok =
false)
521 {
return scalar.float_value (); }
592 return scalar.bool_value ();
633 block_size, output_type, skip, flt_fmt);
644 OCTAVE_INT_T::val_type *pr =
static_cast<OCTAVE_INT_T::val_type *
>
691 return save_hdf5_internal (loc_id, hdf5_save_type,
name, flag);
696 return load_hdf5_internal (loc_id, hdf5_save_type,
name);
N Dimensional Array with copy-on-write semantics.
const T * fortran_vec(void) const
Size of the specified dimension.
Vector representing the dimensions (size) of an Array.
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
octave_idx_type ndims(void) const
Number of dimensions.
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, mach_info::float_format flt_fmt)
builtin_type_t builtin_type(void) const
static octave_hdf5_id hdf5_save_type
double double_value(bool=false) const
float float_value(bool=false) const
int64NDArray int64_array_value(void) const
uint16NDArray uint16_array_value(void) const
FloatMatrix float_matrix_value(bool=false) const
octave_value map(unary_mapper_t umap) const
boolNDArray bool_array_value(bool warn=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
uint64NDArray uint64_array_value(void) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool flag)
float float_scalar_value(bool=false) const
FloatNDArray float_array_value(bool=false) const
octave_base_value * empty_clone(void) const
bool isinteger(void) const
mxArray * as_mxArray(void) const
Matrix matrix_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
void * mex_get_data(void) const
FloatComplexNDArray float_complex_array_value(bool=false) const
ComplexNDArray complex_array_value(bool=false) const
uint8NDArray uint8_array_value(void) const
NDArray array_value(bool=false) const
int16NDArray int16_array_value(void) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
uint32NDArray uint32_array_value(void) const
charNDArray char_array_value(bool=false) const
octave_base_value * clone(void) const
ComplexMatrix complex_matrix_value(bool=false) const
int8NDArray int8_array_value(void) const
int32NDArray int32_array_value(void) const
double scalar_value(bool=false) const
idx_vector index_vector(bool=false) const
idx_vector index_vector(bool=false) const
Matrix matrix_value(bool=false) const
octave_uint32 uint32_scalar_value(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
int8NDArray int8_array_value(void) const
FloatNDArray float_array_value(bool=false) const
int32NDArray int32_array_value(void) const
uint64NDArray uint64_array_value(void) const
octave_base_value * empty_clone(void) const
bool bool_value(bool warn=false) const
FloatMatrix float_matrix_value(bool=false) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool flag)
int64NDArray int64_array_value(void) const
uint8NDArray uint8_array_value(void) const
octave_int8 int8_scalar_value(void) const
NDArray array_value(bool=false) const
ComplexNDArray complex_array_value(bool=false) const
static octave_hdf5_id hdf5_save_type
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_uint16 uint16_scalar_value(void) const
float float_value(bool=false) const
double double_value(bool=false) const
ComplexMatrix complex_matrix_value(bool=false) const
octave_base_value * clone(void) const
void * mex_get_data(void) const
FloatComplexNDArray float_complex_array_value(bool=false) const
double scalar_value(bool=false) const
FloatComplexMatrix float_complex_matrix_value(bool=false) const
octave_uint8 uint8_scalar_value(void) const
octave_int64 int64_scalar_value(void) const
builtin_type_t builtin_type(void) const
int16NDArray int16_array_value(void) const
uint32NDArray uint32_array_value(void) const
mxArray * as_mxArray(void) const
float float_scalar_value(bool=false) const
octave_value map(unary_mapper_t umap) const
octave_uint64 uint64_scalar_value(void) const
bool isinteger(void) const
uint16NDArray uint16_array_value(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_int32 int32_scalar_value(void) const
octave_int16 int16_scalar_value(void) const
charNDArray char_array_value(bool=false) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
boolNDArray bool_array_value(bool warn=false) const
octave_value signum(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
octave_value abs(void) const
void error(const char *fmt,...)
void err_invalid_conversion(const std::string &from, const std::string &to)
void warn_logical_conversion(void)
void warn_implicit_conversion(const char *id, const char *from, const char *to)
intNDArray< octave_int16 > int16NDArray
intNDArray< octave_int32 > int32NDArray
intNDArray< octave_int64 > int64NDArray
intNDArray< octave_int8 > int8NDArray
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
T::size_type numel(const T &str)
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
#define OCTAVE_INT_MX_CLASS
#define OCTAVE_TYPE_PREDICATE_FUNCTION
#define OCTAVE_VALUE_INT_NDARRAY_EXTRACTOR_FUNCTION
#define OCTAVE_VALUE_INT_MATRIX_T
#define OCTAVE_VALUE_INT_SCALAR_T
static bool scalar(const dim_vector &dims)
octave_value::octave_value(const Array< char > &chm, char type) return retval
intNDArray< octave_uint16 > uint16NDArray
intNDArray< octave_uint32 > uint32NDArray
intNDArray< octave_uint64 > uint64NDArray
intNDArray< octave_uint8 > uint8NDArray