GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
mxArray_number Class Reference
Inheritance diagram for mxArray_number:
Inheritance graph
[legend]
Collaboration diagram for mxArray_number:
Collaboration graph
[legend]

Public Member Functions

 mxArray_number (mxClassID id_arg, mwSize ndims_arg, const mwSize *dims_arg, mxComplexity flag=mxREAL)
 
 mxArray_number (mxClassID id_arg, const dim_vector &dv, mxComplexity flag=mxREAL)
 
 mxArray_number (mxClassID id_arg, mwSize m, mwSize n, mxComplexity flag=mxREAL)
 
 mxArray_number (mxClassID id_arg, double val)
 
 mxArray_number (mxClassID id_arg, mxLogical val)
 
 mxArray_number (const char *str)
 
 mxArray_number (mwSize m, const char **str)
 
 ~mxArray_number (void)
 
int add_field (const char *)
 
chararray_to_string (void) const
 
virtual mxArrayas_mxArray (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 charget_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 charget_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
 
double get_scalar (void) const
 
int get_string (char *buf, mwSize buflen) const
 
int is_cell (void) const
 
int is_char (void) const
 
virtual int is_class (const char *name_arg) const
 
virtual int is_class (const char *name_arg) const
 
int is_complex (void) const
 
int is_double (void) const
 
int is_empty (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
 
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
 
virtual bool is_octave_value (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
 
virtual mxArraymutate (void) const
 
virtual mxArraymutate (void) const
 
virtual bool mutation_needed (void) const
 
virtual bool mutation_needed (void) const
 
void remove_field (int)
 
void set_cell (mwIndex, mxArray *)
 
void set_class_name (const char *name_arg)
 
void set_data (void *pr_arg)
 
void 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)
 

Protected Member Functions

 mxArray_number (const mxArray_number &val)
 
dim_vector dims_to_dim_vector (void) const
 
void error (const char *msg) const
 
void error (const char *msg) 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

mxArray_numberoperator= (const mxArray_number &)
 

Private Attributes

void * pi
 
void * pr
 

Detailed Description

Definition at line 989 of file mex.cc.

Constructor & Destructor Documentation

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

Definition at line 993 of file mex.cc.

Referenced by dup().

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

Definition at line 1001 of file mex.cc.

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

Definition at line 1009 of file mex.cc.

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

Definition at line 1017 of file mex.cc.

References pr.

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

Definition at line 1026 of file mex.cc.

References pr.

mxArray_number::mxArray_number ( const char str)
inline

Definition at line 1035 of file mex.cc.

References mxArray_matlab::get_number_of_elements(), and pr.

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

Definition at line 1049 of file mex.cc.

References mxArray_matlab::get_dimensions(), and pr.

mxArray_number::~mxArray_number ( void  )
inline

Definition at line 1076 of file mex.cc.

References mxFree(), pi, and pr.

mxArray_number::mxArray_number ( const mxArray_number val)
inlineprotected

Member Function Documentation

int mxArray_matlab::add_field ( const char )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 860 of file mex.cc.

References mxArray_matlab::invalid_type_error().

char* mxArray_number::array_to_string ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1179 of file mex.cc.

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

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

Reimplemented in mxArray_octave_value.

Definition at line 134 of file mxarray.h.

Referenced by mxArray::dup().

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

Reimplemented in mxArray_octave_value.

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

octave_value mxArray_number::as_octave_value ( void  ) const
inlinevirtual
mwIndex mxArray_matlab::calc_single_subscript ( mwSize  nsubs,
mwIndex subs 
) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 912 of file mex.cc.

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

dim_vector mxArray_matlab::dims_to_dim_vector ( void  ) const
inlineprotectedinherited
mxArray_base* mxArray_number::dup ( void  ) const
inlinevirtual

Implements mxArray_base.

Definition at line 1074 of file mex.cc.

References mxArray_number().

void mxArray_base::error ( const char msg) const
protectedinherited
void mxArray_base::error ( const char msg) const
protectedinherited
mxArray* mxArray_matlab::get_cell ( mwIndex  ) const
inlinevirtualinherited

Reimplemented from mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 788 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mxClassID mxArray_matlab::get_class_id ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 756 of file mex.cc.

References mxArray_matlab::id.

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

const char* mxArray_matlab::get_class_name ( void  ) const
inlinevirtualinherited
void* mxArray_number::get_data ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1145 of file mex.cc.

References pr.

mwSize* mxArray_matlab::get_dimensions ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 730 of file mex.cc.

References mxArray_matlab::dims.

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

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

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 871 of file mex.cc.

References mxArray_matlab::invalid_type_error().

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

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 889 of file mex.cc.

References mxArray_matlab::invalid_type_error().

int mxArray_matlab::get_field_number ( const char ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 895 of file mex.cc.

void* mxArray_number::get_imag_data ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1147 of file mex.cc.

References pi.

mwIndex* mxArray_matlab::get_ir ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 827 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mwIndex* mxArray_matlab::get_jc ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 833 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mwSize mxArray_matlab::get_m ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 718 of file mex.cc.

References mxArray_matlab::dims.

Referenced by mxArray_sparse::as_octave_value().

mwSize mxArray_matlab::get_n ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 720 of file mex.cc.

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

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

mwSize mxArray_matlab::get_number_of_dimensions ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 732 of file mex.cc.

References mxArray_matlab::ndims.

Referenced by mxArray_matlab::dims_to_dim_vector().

mwSize mxArray_matlab::get_number_of_elements ( void  ) const
inlinevirtualinherited
int mxArray_matlab::get_number_of_fields ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 883 of file mex.cc.

References mxArray_matlab::invalid_type_error().

mwSize mxArray_matlab::get_nzmax ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 839 of file mex.cc.

References mxArray_matlab::invalid_type_error().

double mxArray_number::get_scalar ( void  ) const
inlinevirtual
int mxArray_number::get_string ( char buf,
mwSize  buflen 
) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1153 of file mex.cc.

References mxArray_matlab::get_number_of_elements(), and pr.

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 1338 of file mex.cc.

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

int mxArray_matlab::is_cell ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 669 of file mex.cc.

References mxCELL_CLASS.

int mxArray_matlab::is_char ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 671 of file mex.cc.

References mxCHAR_CLASS.

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

Definition at line 144 of file mxarray.h.

References mxArray_base::get_class_name().

Referenced by mxArray::is_class().

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

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

References mxArray_base::get_class_name().

int mxArray_number::is_complex ( void  ) const
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1082 of file mex.cc.

References pi.

int mxArray_matlab::is_double ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 675 of file mex.cc.

References mxDOUBLE_CLASS.

int mxArray_matlab::is_empty ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 754 of file mex.cc.

References mxArray_matlab::get_number_of_elements().

int mxArray_matlab::is_function_handle ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 677 of file mex.cc.

References mxFUNCTION_CLASS.

int mxArray_matlab::is_int16 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 679 of file mex.cc.

References mxINT16_CLASS.

int mxArray_matlab::is_int32 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 681 of file mex.cc.

References mxINT32_CLASS.

int mxArray_matlab::is_int64 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 683 of file mex.cc.

References mxINT64_CLASS.

int mxArray_matlab::is_int8 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 685 of file mex.cc.

References mxINT8_CLASS.

int mxArray_matlab::is_logical ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 687 of file mex.cc.

References mxLOGICAL_CLASS.

virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtualinherited
virtual int mxArray_base::is_logical_scalar ( void  ) const
inlinevirtualinherited
int mxArray_matlab::is_logical_scalar_true ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 712 of file mex.cc.

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

int mxArray_matlab::is_numeric ( void  ) const
inlinevirtualinherited
virtual bool mxArray_base::is_octave_value ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 138 of file mxarray.h.

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

virtual bool mxArray_base::is_octave_value ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

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

int mxArray_matlab::is_single ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 698 of file mex.cc.

References mxSINGLE_CLASS.

int mxArray_matlab::is_sparse ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 700 of file mex.cc.

int mxArray_matlab::is_struct ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 702 of file mex.cc.

References mxSTRUCT_CLASS.

int mxArray_matlab::is_uint16 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 704 of file mex.cc.

References mxUINT16_CLASS.

int mxArray_matlab::is_uint32 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 706 of file mex.cc.

References mxUINT32_CLASS.

int mxArray_matlab::is_uint64 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 708 of file mex.cc.

References mxUINT64_CLASS.

int mxArray_matlab::is_uint8 ( void  ) const
inlinevirtualinherited

Implements mxArray_base.

Definition at line 710 of file mex.cc.

References mxUINT8_CLASS.

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

Reimplemented in mxArray_octave_value.

Definition at line 274 of file mxarray.h.

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

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

Reimplemented in mxArray_octave_value.

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

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

Definition at line 272 of file mxarray.h.

Referenced by mxArray::mutation_needed().

virtual bool mxArray_base::mutation_needed ( void  ) const
inlinevirtualinherited

Reimplemented in mxArray_octave_value.

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

mxArray_number& mxArray_number::operator= ( const mxArray_number )
private
void mxArray_matlab::remove_field ( int  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 866 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_cell ( mwIndex  ,
mxArray  
)
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_cell.

Definition at line 794 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_class_name ( const char name_arg)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 781 of file mex.cc.

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

void mxArray_number::set_data ( void *  pr_arg)
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1149 of file mex.cc.

References pr.

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

Implements mxArray_base.

Definition at line 738 of file mex.cc.

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

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

Implements mxArray_base.

Reimplemented in mxArray_struct.

Definition at line 877 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_number::set_imag_data ( void *  pi_arg)
inlinevirtual

Reimplemented from mxArray_matlab.

Definition at line 1151 of file mex.cc.

References pi.

void mxArray_matlab::set_ir ( mwIndex )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 845 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_jc ( mwIndex )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 850 of file mex.cc.

References mxArray_matlab::invalid_type_error().

void mxArray_matlab::set_m ( mwSize  m)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 734 of file mex.cc.

References mxArray_matlab::dims.

void mxArray_matlab::set_n ( mwSize  n)
inlinevirtualinherited

Implements mxArray_base.

Definition at line 736 of file mex.cc.

References mxArray_matlab::dims.

void mxArray_matlab::set_nzmax ( mwSize  )
inlinevirtualinherited

Implements mxArray_base.

Reimplemented in mxArray_sparse.

Definition at line 855 of file mex.cc.

References mxArray_matlab::invalid_type_error().

Member Data Documentation

void* mxArray_number::pi
private
void* mxArray_number::pr
private

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