GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mxArray_number Class Reference
Inheritance diagram for mxArray_number:
Collaboration diagram for mxArray_number:

Public Member Functions

 mxArray_number (const char *str)
 
 mxArray_number (mwSize m, const char **str)
 
 mxArray_number (mxClassID id_arg, const dim_vector &dv, mxComplexity flag=mxREAL)
 
 mxArray_number (mxClassID id_arg, double val)
 
 mxArray_number (mxClassID id_arg, mwSize m, mwSize n, mxComplexity flag=mxREAL, bool init=true)
 
 mxArray_number (mxClassID id_arg, mwSize ndims_arg, const mwSize *dims_arg, mxComplexity flag=mxREAL, bool init=true)
 
 mxArray_number (mxClassID id_arg, mxLogical val)
 
 ~mxArray_number (void)
 
int add_field (const char *)
 
char * array_to_string (void) const
 
virtual mxArrayas_mxArray (void) const
 
octave_value as_octave_value (void) const
 
mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const
 
mxArray_basedup (void) const
 
mxArrayget_cell (mwIndex) const
 
mxClassID get_class_id (void) const
 
const char * get_class_name (void) const
 
void * get_data (void) const
 
mwSizeget_dimensions (void) const
 
size_t get_element_size (void) const
 
mxArrayget_field_by_number (mwIndex, int) const
 
const char * get_field_name_by_number (int) const
 
int get_field_number (const char *) const
 
void * get_imag_data (void) const
 
mwIndexget_ir (void) const
 
mwIndexget_jc (void) const
 
mwSize get_m (void) const
 
mwSize get_n (void) const
 
mwSize get_number_of_dimensions (void) const
 
mwSize get_number_of_elements (void) const
 
int get_number_of_fields (void) const
 
mwSize get_nzmax (void) const
 
virtual mxArrayget_property (mwIndex, const char *) const
 
double get_scalar (void) const
 
int get_string (char *buf, mwSize buflen) const
 
int is_char (void) const
 
virtual int is_class (const char *name_arg) const
 
int is_complex (void) const
 
int is_double (void) const
 
int is_function_handle (void) const
 
int is_int16 (void) const
 
int is_int32 (void) const
 
int is_int64 (void) const
 
int is_int8 (void) const
 
int is_logical (void) const
 
virtual int is_logical_scalar (void) const
 
int is_logical_scalar_true (void) const
 
int is_numeric (void) const
 
virtual bool is_octave_value (void) const
 
bool is_scalar (void) const
 
int is_single (void) const
 
int is_sparse (void) const
 
int is_struct (void) const
 
int is_uint16 (void) const
 
int is_uint32 (void) const
 
int is_uint64 (void) const
 
int is_uint8 (void) const
 
int iscell (void) const
 
int isempty (void) const
 
virtual mxArraymutate (void) const
 
virtual bool mutation_needed (void) const
 
mxArray_numberoperator= (const mxArray_number &)
 
void remove_field (int)
 
void set_cell (mwIndex, mxArray *)
 
void set_class_name (const char *name_arg)
 
void set_data (void *pr_arg)
 
int set_dimensions (mwSize *dims_arg, mwSize ndims_arg)
 
void set_field_by_number (mwIndex, int, mxArray *)
 
void set_imag_data (void *pi_arg)
 
void set_ir (mwIndex *)
 
void set_jc (mwIndex *)
 
void set_m (mwSize m)
 
void set_n (mwSize n)
 
void set_nzmax (mwSize)
 
virtual void set_property (mwIndex, const char *, const mxArray *)
 

Protected Member Functions

 mxArray_number (const mxArray_number &val)
 
dim_vector dims_to_dim_vector (void) const
 
template<typename ELT_T , typename ARRAY_T , typename ARRAY_ELT_T >
octave_value int_to_ov (const dim_vector &dv) const
 

Private Member Functions

OCTAVE_NORETURN void err_invalid_type (void) const
 

Private Attributes

char * class_name
 
mwSizedims
 
mxClassID id
 
mwSize ndims
 
void * pi
 
void * pr
 

Detailed Description

Definition at line 1077 of file mex.cc.

Constructor & Destructor Documentation

◆ mxArray_number() [1/8]

mxArray_number::mxArray_number ( mxClassID  id_arg,
mwSize  ndims_arg,
const mwSize dims_arg,
mxComplexity  flag = mxREAL,
bool  init = true 
)
inline

Definition at line 1081 of file mex.cc.

Referenced by dup().

◆ mxArray_number() [2/8]

mxArray_number::mxArray_number ( mxClassID  id_arg,
const dim_vector dv,
mxComplexity  flag = mxREAL 
)
inline

Definition at line 1095 of file mex.cc.

◆ mxArray_number() [3/8]

mxArray_number::mxArray_number ( mxClassID  id_arg,
mwSize  m,
mwSize  n,
mxComplexity  flag = mxREAL,
bool  init = true 
)
inline

Definition at line 1104 of file mex.cc.

◆ mxArray_number() [4/8]

mxArray_number::mxArray_number ( mxClassID  id_arg,
double  val 
)
inline

Definition at line 1119 of file mex.cc.

References pr.

◆ mxArray_number() [5/8]

mxArray_number::mxArray_number ( mxClassID  id_arg,
mxLogical  val 
)
inline

Definition at line 1128 of file mex.cc.

References pr.

◆ mxArray_number() [6/8]

mxArray_number::mxArray_number ( const char *  str)
inline

Definition at line 1137 of file mex.cc.

References mxArray_matlab::get_number_of_elements(), and pr.

◆ mxArray_number() [7/8]

mxArray_number::mxArray_number ( mwSize  m,
const char **  str 
)
inline

Definition at line 1151 of file mex.cc.

References mxArray_matlab::get_dimensions(), m, pr, and strlen().

◆ mxArray_number() [8/8]

mxArray_number::mxArray_number ( const mxArray_number val)
inlineprotected

◆ ~mxArray_number()

mxArray_number::~mxArray_number ( void  )
inline

Definition at line 1203 of file mex.cc.

References mxFree(), pi, and pr.

Member Function Documentation

◆ add_field()

int mxArray_matlab::add_field ( const char *  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 966 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ array_to_string()

char* mxArray_number::array_to_string ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1306 of file mex.cc.

References mxArray_matlab::get_number_of_elements(), mxArray::malloc(), and pr.

◆ as_mxArray()

virtual mxArray* mxArray_base::as_mxArray ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 144 of file mxarray.in.h.

Referenced by mxArray::dup().

◆ as_octave_value()

◆ calc_single_subscript()

mwIndex mxArray_matlab::calc_single_subscript ( mwSize  nsubs,
mwIndex subs 
) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 1012 of file mex.cc.

References calc_single_subscript_internal(), mxArray_matlab::dims, and mxArray_matlab::ndims.

◆ dims_to_dim_vector()

dim_vector mxArray_matlab::dims_to_dim_vector ( void  ) const
inlineprotectedinherited

◆ dup()

mxArray_base* mxArray_number::dup ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 1201 of file mex.cc.

References mxArray_number().

◆ err_invalid_type()

◆ get_cell()

mxArray* mxArray_matlab::get_cell ( mwIndex  ) const
inlinevirtualinherited

Reimplemented from mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 901 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_class_id()

mxClassID mxArray_matlab::get_class_id ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 867 of file mex.cc.

References mxArray_matlab::id.

Referenced by as_octave_value(), mxArray_sparse::as_octave_value(), and get_scalar().

◆ get_class_name()

const char* mxArray_matlab::get_class_name ( void  ) const
inlinevirtualinherited

◆ get_data()

void* mxArray_number::get_data ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1272 of file mex.cc.

References pr.

◆ get_dimensions()

mwSize* mxArray_matlab::get_dimensions ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 816 of file mex.cc.

References mxArray_matlab::dims.

Referenced by mxArray_number(), and mxArray_matlab::dims_to_dim_vector().

◆ get_element_size()

size_t mxArray_matlab::get_element_size ( void  ) const
inlinevirtualinherited

◆ get_field_by_number()

mxArray* mxArray_matlab::get_field_by_number ( mwIndex  ,
int   
) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 976 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_field_name_by_number()

const char* mxArray_matlab::get_field_name_by_number ( int  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 992 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_field_number()

int mxArray_matlab::get_field_number ( const char *  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 997 of file mex.cc.

◆ get_imag_data()

void* mxArray_number::get_imag_data ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1274 of file mex.cc.

References pi.

◆ get_ir()

mwIndex* mxArray_matlab::get_ir ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 936 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_jc()

mwIndex* mxArray_matlab::get_jc ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 941 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_m()

mwSize mxArray_matlab::get_m ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 804 of file mex.cc.

References mxArray_matlab::dims.

Referenced by mxArray_sparse::as_octave_value().

◆ get_n()

mwSize mxArray_matlab::get_n ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 806 of file mex.cc.

References mxArray_matlab::dims, n, and mxArray_matlab::ndims.

Referenced by mxArray_sparse::mxArray_sparse(), and mxArray_sparse::as_octave_value().

◆ get_number_of_dimensions()

mwSize mxArray_matlab::get_number_of_dimensions ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 818 of file mex.cc.

References mxArray_matlab::ndims.

Referenced by mxArray_matlab::dims_to_dim_vector().

◆ get_number_of_elements()

◆ get_number_of_fields()

int mxArray_matlab::get_number_of_fields ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 987 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_nzmax()

mwSize mxArray_matlab::get_nzmax ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 946 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ get_property()

virtual mxArray* mxArray_base::get_property ( mwIndex  ,
const char *   
) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 237 of file mxarray.in.h.

Referenced by mxArray::get_property().

◆ get_scalar()

double mxArray_number::get_scalar ( void  ) const
inlinevirtual

◆ get_string()

int mxArray_number::get_string ( char *  buf,
mwSize  buflen 
) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1280 of file mex.cc.

References mxArray_matlab::get_number_of_elements(), pr, and retval.

◆ int_to_ov()

template<typename ELT_T , typename ARRAY_T , typename ARRAY_ELT_T >
octave_value mxArray_number::int_to_ov ( const dim_vector dv) const
inlineprotected

Definition at line 1465 of file mex.cc.

References error(), mxArray_matlab::get_number_of_elements(), octave_value(), pi, and pr.

◆ is_char()

int mxArray_matlab::is_char ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 757 of file mex.cc.

References mxCHAR_CLASS.

◆ is_class()

virtual int mxArray_base::is_class ( const char *  name_arg) const
inlinevirtualinherited

Definition at line 154 of file mxarray.in.h.

References mxArray_base::get_class_name(), retval, and octave::string::strcmp().

Referenced by mxArray::is_class().

◆ is_complex()

int mxArray_number::is_complex ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1209 of file mex.cc.

References pi.

◆ is_double()

int mxArray_matlab::is_double ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 761 of file mex.cc.

References mxDOUBLE_CLASS.

◆ is_function_handle()

int mxArray_matlab::is_function_handle ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 763 of file mex.cc.

References mxFUNCTION_CLASS.

◆ is_int16()

int mxArray_matlab::is_int16 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 765 of file mex.cc.

References mxINT16_CLASS.

◆ is_int32()

int mxArray_matlab::is_int32 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 767 of file mex.cc.

References mxINT32_CLASS.

◆ is_int64()

int mxArray_matlab::is_int64 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 769 of file mex.cc.

References mxINT64_CLASS.

◆ is_int8()

int mxArray_matlab::is_int8 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 771 of file mex.cc.

References mxINT8_CLASS.

◆ is_logical()

int mxArray_matlab::is_logical ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 773 of file mex.cc.

References mxLOGICAL_CLASS.

◆ is_logical_scalar()

virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtualinherited

◆ is_logical_scalar_true()

int mxArray_matlab::is_logical_scalar_true ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 798 of file mex.cc.

References mxArray_matlab::get_data(), and mxArray_base::is_logical_scalar().

◆ is_numeric()

int mxArray_matlab::is_numeric ( void  ) const
inlinevirtualinherited

◆ is_octave_value()

virtual bool mxArray_base::is_octave_value ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 148 of file mxarray.in.h.

Referenced by mxArray::is_octave_value(), and mxArray::maybe_mutate().

◆ is_scalar()

bool mxArray_matlab::is_scalar ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 862 of file mex.cc.

References mxArray_matlab::dims, and mxArray_matlab::ndims.

◆ is_single()

int mxArray_matlab::is_single ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 784 of file mex.cc.

References mxSINGLE_CLASS.

◆ is_sparse()

int mxArray_matlab::is_sparse ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 786 of file mex.cc.

◆ is_struct()

int mxArray_matlab::is_struct ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 788 of file mex.cc.

References mxSTRUCT_CLASS.

◆ is_uint16()

int mxArray_matlab::is_uint16 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 790 of file mex.cc.

References mxUINT16_CLASS.

◆ is_uint32()

int mxArray_matlab::is_uint32 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 792 of file mex.cc.

References mxUINT32_CLASS.

◆ is_uint64()

int mxArray_matlab::is_uint64 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 794 of file mex.cc.

References mxUINT64_CLASS.

◆ is_uint8()

int mxArray_matlab::is_uint8 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 796 of file mex.cc.

References mxUINT8_CLASS.

◆ iscell()

int mxArray_matlab::iscell ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 755 of file mex.cc.

References mxCELL_CLASS.

◆ isempty()

int mxArray_matlab::isempty ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 860 of file mex.cc.

References mxArray_matlab::get_number_of_elements().

◆ mutate()

virtual mxArray* mxArray_base::mutate ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 302 of file mxarray.in.h.

Referenced by mxArray::maybe_mutate(), and mxArray::mutate().

◆ mutation_needed()

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 300 of file mxarray.in.h.

Referenced by mxArray::mutation_needed().

◆ operator=()

mxArray_number& mxArray_number::operator= ( const mxArray_number )

◆ remove_field()

void mxArray_matlab::remove_field ( int  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 971 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ set_cell()

void mxArray_matlab::set_cell ( mwIndex  ,
mxArray  
)
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 906 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ set_class_name()

void mxArray_matlab::set_class_name ( const char *  name_arg)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 894 of file mex.cc.

References mxArray_matlab::class_name, mxArray::malloc(), mxFree(), and strlen().

◆ set_data()

void mxArray_number::set_data ( void *  pr_arg)
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1276 of file mex.cc.

References pr.

◆ set_dimensions()

int mxArray_matlab::set_dimensions ( mwSize dims_arg,
mwSize  ndims_arg 
)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 824 of file mex.cc.

References mxArray_matlab::dims, mxArray::malloc(), mxFree(), and mxArray_matlab::ndims.

◆ set_field_by_number()

void mxArray_matlab::set_field_by_number ( mwIndex  ,
int  ,
mxArray  
)
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 981 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ set_imag_data()

void mxArray_number::set_imag_data ( void *  pi_arg)
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1278 of file mex.cc.

References pi.

◆ set_ir()

void mxArray_matlab::set_ir ( mwIndex )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 951 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ set_jc()

void mxArray_matlab::set_jc ( mwIndex )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 956 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ set_m()

void mxArray_matlab::set_m ( mwSize  m)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 820 of file mex.cc.

References mxArray_matlab::dims, and m.

◆ set_n()

void mxArray_matlab::set_n ( mwSize  n)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 822 of file mex.cc.

References mxArray_matlab::dims, and n.

◆ set_nzmax()

void mxArray_matlab::set_nzmax ( mwSize  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 961 of file mex.cc.

References mxArray_matlab::err_invalid_type().

◆ set_property()

virtual void mxArray_base::set_property ( mwIndex  ,
const char *  ,
const mxArray  
)
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 242 of file mxarray.in.h.

References mxArray_base::err_invalid_type().

Referenced by mxArray::set_property().

Member Data Documentation

◆ class_name

char* mxArray_matlab::class_name
privateinherited

Definition at line 1062 of file mex.cc.

Referenced by mxArray_matlab::~mxArray_matlab(), and mxArray_matlab::set_class_name().

◆ dims

◆ id

mxClassID mxArray_matlab::id
privateinherited

Definition at line 1064 of file mex.cc.

Referenced by mxArray_matlab::get_class_id().

◆ ndims

◆ pi

void* mxArray_number::pi
private

◆ pr

void* mxArray_number::pr
private

The documentation for this class was generated from the following file: