GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mxArray Class Reference

#include "mxarray.in.h"

Collaboration diagram for mxArray:

Public Member Functions

 mxArray (const octave_value &ov)
 
 mxArray (mxClassID id, mwSize ndims, const mwSize *dims, mxComplexity flag=mxREAL, bool init=true)
 
 mxArray (mxClassID id, const dim_vector &dv, mxComplexity flag=mxREAL)
 
 mxArray (mxClassID id, mwSize m, mwSize n, mxComplexity flag=mxREAL, bool init=true)
 
 mxArray (mxClassID id, double val)
 
 mxArray (mxClassID id, mxLogical val)
 
 mxArray (const char *str)
 
 mxArray (mwSize m, const char **str)
 
 mxArray (mxClassID id, mwSize m, mwSize n, mwSize nzmax, mxComplexity flag=mxREAL)
 
 mxArray (mwSize ndims, const mwSize *dims, int num_keys, const char **keys)
 
 mxArray (const dim_vector &dv, int num_keys, const char **keys)
 
 mxArray (mwSize m, mwSize n, int num_keys, const char **keys)
 
 mxArray (mwSize ndims, const mwSize *dims)
 
 mxArray (const dim_vector &dv)
 
 mxArray (mwSize m, mwSize n)
 
 mxArray (const mxArray &)=delete
 
 ~mxArray (void)
 
int add_field (const char *key)
 
char * array_to_string (void) const
 
octave_value as_octave_value (void) const
 
mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const
 
mxArraydup (void) const
 
mxArrayget_cell (mwIndex idx) 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 index, int key_num) const
 
const char * get_field_name_by_number (int key_num) const
 
int get_field_number (const char *key) 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
 
const char * get_name (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
 
mxArrayget_property (mwIndex idx, const char *pname) const
 
double get_scalar (void) const
 
int get_string (char *buf, mwSize buflen) const
 
int is_char (void) const
 
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
 
int is_logical_scalar (void) const
 
int is_logical_scalar_true (void) const
 
int is_numeric (void) const
 
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
 
mxArraymutate (void) const
 
bool mutation_needed (void) const
 
mxArrayoperator= (const mxArray &)=delete
 
void remove_field (int key_num)
 
void set_cell (mwIndex idx, mxArray *val)
 
void set_class_name (const char *name_arg)
 
void set_data (void *pr)
 
int set_dimensions (mwSize *dims_arg, mwSize ndims_arg)
 
void set_field_by_number (mwIndex index, int key_num, mxArray *val)
 
void set_imag_data (void *pi)
 
void set_ir (mwIndex *ir)
 
void set_jc (mwIndex *jc)
 
void set_m (mwSize m)
 
void set_n (mwSize n)
 
void set_name (const char *name_arg)
 
void set_nzmax (mwSize nzmax)
 
void set_property (mwIndex idx, const char *pname, const mxArray *pval)
 

Static Public Member Functions

static octave_value as_octave_value (const mxArray *ptr, bool null_is_empty=true)
 
static void * calloc (size_t n, size_t t)
 
static void * malloc (size_t n)
 
static char * strsave (const char *str)
 

Private Member Functions

 mxArray (mxArray_base *r, const char *n)
 
void maybe_mutate (void) const
 

Private Attributes

char * name
 
mxArray_baserep
 

Detailed Description

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

Constructor & Destructor Documentation

◆ mxArray() [1/17]

mxArray::mxArray ( const octave_value ov)

Definition at line 2012 of file mex.cc.

Referenced by dup().

◆ mxArray() [2/17]

mxArray::mxArray ( mxClassID  id,
mwSize  ndims,
const mwSize dims,
mxComplexity  flag = mxREAL,
bool  init = true 
)

Definition at line 2015 of file mex.cc.

◆ mxArray() [3/17]

mxArray::mxArray ( mxClassID  id,
const dim_vector dv,
mxComplexity  flag = mxREAL 
)

Definition at line 2019 of file mex.cc.

◆ mxArray() [4/17]

mxArray::mxArray ( mxClassID  id,
mwSize  m,
mwSize  n,
mxComplexity  flag = mxREAL,
bool  init = true 
)

Definition at line 2022 of file mex.cc.

◆ mxArray() [5/17]

mxArray::mxArray ( mxClassID  id,
double  val 
)

Definition at line 2026 of file mex.cc.

◆ mxArray() [6/17]

mxArray::mxArray ( mxClassID  id,
mxLogical  val 
)

Definition at line 2029 of file mex.cc.

◆ mxArray() [7/17]

mxArray::mxArray ( const char *  str)

Definition at line 2032 of file mex.cc.

◆ mxArray() [8/17]

mxArray::mxArray ( mwSize  m,
const char **  str 
)

Definition at line 2035 of file mex.cc.

◆ mxArray() [9/17]

mxArray::mxArray ( mxClassID  id,
mwSize  m,
mwSize  n,
mwSize  nzmax,
mxComplexity  flag = mxREAL 
)

Definition at line 2038 of file mex.cc.

◆ mxArray() [10/17]

mxArray::mxArray ( mwSize  ndims,
const mwSize dims,
int  num_keys,
const char **  keys 
)

Definition at line 2042 of file mex.cc.

◆ mxArray() [11/17]

mxArray::mxArray ( const dim_vector dv,
int  num_keys,
const char **  keys 
)

Definition at line 2046 of file mex.cc.

◆ mxArray() [12/17]

mxArray::mxArray ( mwSize  m,
mwSize  n,
int  num_keys,
const char **  keys 
)

Definition at line 2049 of file mex.cc.

◆ mxArray() [13/17]

mxArray::mxArray ( mwSize  ndims,
const mwSize dims 
)

Definition at line 2052 of file mex.cc.

◆ mxArray() [14/17]

mxArray::mxArray ( const dim_vector dv)

Definition at line 2055 of file mex.cc.

◆ mxArray() [15/17]

mxArray::mxArray ( mwSize  m,
mwSize  n 
)

Definition at line 2058 of file mex.cc.

◆ mxArray() [16/17]

mxArray::mxArray ( const mxArray )
delete

◆ ~mxArray()

mxArray::~mxArray ( void  )

Definition at line 2061 of file mex.cc.

References mxFree(), name, and rep.

◆ mxArray() [17/17]

mxArray::mxArray ( mxArray_base r,
const char *  n 
)
inlineprivate

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

Member Function Documentation

◆ add_field()

int mxArray::add_field ( const char *  key)
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxAddField().

◆ array_to_string()

char* mxArray::array_to_string ( void  ) const
inline

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

References mxArray_base::array_to_string(), and rep.

Referenced by mxArrayToString().

◆ as_octave_value() [1/2]

octave_value mxArray::as_octave_value ( const mxArray ptr,
bool  null_is_empty = true 
)
static

Definition at line 2076 of file mex.cc.

References as_octave_value(), and octave_value().

Referenced by as_octave_value(), and mxArray_octave_value::set_property().

◆ as_octave_value() [2/2]

octave_value mxArray::as_octave_value ( void  ) const

◆ calc_single_subscript()

mwIndex mxArray::calc_single_subscript ( mwSize  nsubs,
mwIndex subs 
) const
inline

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

References mxArray_base::calc_single_subscript(), rep, and subs.

Referenced by mxCalcSingleSubscript().

◆ calloc()

void * mxArray::calloc ( size_t  n,
size_t  t 
)
static

Definition at line 2444 of file mex.cc.

References mex::calloc_unmarked(), mex_context, and t.

◆ dup()

mxArray* mxArray::dup ( void  ) const
inline

◆ get_cell()

mxArray* mxArray::get_cell ( mwIndex  idx) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetCell().

◆ get_class_id()

mxClassID mxArray::get_class_id ( void  ) const
inline

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

References mxArray_base::get_class_id(), and rep.

Referenced by mxGetClassID().

◆ get_class_name()

const char* mxArray::get_class_name ( void  ) const
inline

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

References mxArray_base::get_class_name(), and rep.

Referenced by mxGetClassName().

◆ get_data()

void* mxArray::get_data ( void  ) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetChars(), mxGetData(), mxGetLogicals(), and mxGetPr().

◆ get_dimensions()

mwSize* mxArray::get_dimensions ( void  ) const
inline

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

References mxArray_base::get_dimensions(), and rep.

Referenced by mxGetDimensions().

◆ get_element_size()

size_t mxArray::get_element_size ( void  ) const
inline

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

References mxArray_base::get_element_size(), and rep.

Referenced by mxGetElementSize().

◆ get_field_by_number()

mxArray* mxArray::get_field_by_number ( mwIndex  index,
int  key_num 
) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetFieldByNumber().

◆ get_field_name_by_number()

const char* mxArray::get_field_name_by_number ( int  key_num) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetFieldNameByNumber().

◆ get_field_number()

int mxArray::get_field_number ( const char *  key) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetFieldNumber().

◆ get_imag_data()

void* mxArray::get_imag_data ( void  ) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetImagData(), and mxGetPi().

◆ get_ir()

mwIndex* mxArray::get_ir ( void  ) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetIr().

◆ get_jc()

mwIndex* mxArray::get_jc ( void  ) const
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxGetJc().

◆ get_m()

mwSize mxArray::get_m ( void  ) const
inline

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

References mxArray_base::get_m(), and rep.

Referenced by mxGetM().

◆ get_n()

mwSize mxArray::get_n ( void  ) const
inline

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

References mxArray_base::get_n(), and rep.

Referenced by mxGetN().

◆ get_name()

const char* mxArray::get_name ( void  ) const
inline

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

References name.

Referenced by mexPutVariable().

◆ get_number_of_dimensions()

mwSize mxArray::get_number_of_dimensions ( void  ) const
inline

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

References mxArray_base::get_number_of_dimensions(), and rep.

Referenced by mxGetNumberOfDimensions().

◆ get_number_of_elements()

mwSize mxArray::get_number_of_elements ( void  ) const
inline

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

References mxArray_base::get_number_of_elements(), and rep.

Referenced by isempty(), and mxGetNumberOfElements().

◆ get_number_of_fields()

int mxArray::get_number_of_fields ( void  ) const
inline

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

References mxArray_base::get_number_of_fields(), and rep.

Referenced by mxGetNumberOfFields().

◆ get_nzmax()

mwSize mxArray::get_nzmax ( void  ) const
inline

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

References mxArray_base::get_nzmax(), and rep.

Referenced by mxGetNzmax().

◆ get_property()

mxArray* mxArray::get_property ( mwIndex  idx,
const char *  pname 
) const
inline

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

References mxArray_base::get_property(), pname, and rep.

Referenced by mxGetProperty().

◆ get_scalar()

double mxArray::get_scalar ( void  ) const
inline

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

References mxArray_base::get_scalar(), and rep.

Referenced by mxGetScalar().

◆ get_string()

int mxArray::get_string ( char *  buf,
mwSize  buflen 
) const
inline

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

References mxArray_base::get_string(), and rep.

Referenced by mxGetString().

◆ is_char()

int mxArray::is_char ( void  ) const
inline

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

References mxArray_base::is_char(), and rep.

Referenced by mxIsChar().

◆ is_class()

int mxArray::is_class ( const char *  name_arg) const
inline

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

References mxArray_base::is_class(), and rep.

Referenced by mxIsClass().

◆ is_complex()

int mxArray::is_complex ( void  ) const
inline

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

References mxArray_base::is_complex(), and rep.

Referenced by mxIsComplex().

◆ is_double()

int mxArray::is_double ( void  ) const
inline

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

References mxArray_base::is_double(), and rep.

Referenced by mxIsDouble().

◆ is_function_handle()

int mxArray::is_function_handle ( void  ) const
inline

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

References mxArray_base::is_function_handle(), and rep.

Referenced by mxIsFunctionHandle().

◆ is_int16()

int mxArray::is_int16 ( void  ) const
inline

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

References mxArray_base::is_int16(), and rep.

Referenced by mxIsInt16().

◆ is_int32()

int mxArray::is_int32 ( void  ) const
inline

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

References mxArray_base::is_int32(), and rep.

Referenced by mxIsInt32().

◆ is_int64()

int mxArray::is_int64 ( void  ) const
inline

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

References mxArray_base::is_int64(), and rep.

Referenced by mxIsInt64().

◆ is_int8()

int mxArray::is_int8 ( void  ) const
inline

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

References mxArray_base::is_int8(), and rep.

Referenced by mxIsInt8().

◆ is_logical()

int mxArray::is_logical ( void  ) const
inline

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

References mxArray_base::is_logical(), and rep.

Referenced by mxIsLogical().

◆ is_logical_scalar()

int mxArray::is_logical_scalar ( void  ) const
inline

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

References mxArray_base::is_logical_scalar(), and rep.

Referenced by mxIsLogicalScalar().

◆ is_logical_scalar_true()

int mxArray::is_logical_scalar_true ( void  ) const
inline

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

References mxArray_base::is_logical_scalar_true(), and rep.

Referenced by mxIsLogicalScalarTrue().

◆ is_numeric()

int mxArray::is_numeric ( void  ) const
inline

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

References mxArray_base::is_numeric(), and rep.

Referenced by mxIsNumeric().

◆ is_octave_value()

bool mxArray::is_octave_value ( void  ) const
inline

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

References mxArray_base::is_octave_value(), and rep.

◆ is_scalar()

bool mxArray::is_scalar ( void  ) const
inline

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

References mxArray_base::is_scalar(), and rep.

Referenced by mxIsScalar().

◆ is_single()

int mxArray::is_single ( void  ) const
inline

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

References mxArray_base::is_single(), and rep.

Referenced by mxIsSingle().

◆ is_sparse()

int mxArray::is_sparse ( void  ) const
inline

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

References mxArray_base::is_sparse(), and rep.

Referenced by mxIsSparse().

◆ is_struct()

int mxArray::is_struct ( void  ) const
inline

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

References mxArray_base::is_struct(), and rep.

Referenced by mxIsStruct().

◆ is_uint16()

int mxArray::is_uint16 ( void  ) const
inline

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

References mxArray_base::is_uint16(), and rep.

Referenced by mxIsUint16().

◆ is_uint32()

int mxArray::is_uint32 ( void  ) const
inline

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

References mxArray_base::is_uint32(), and rep.

Referenced by mxIsUint32().

◆ is_uint64()

int mxArray::is_uint64 ( void  ) const
inline

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

References mxArray_base::is_uint64(), and rep.

Referenced by mxIsUint64().

◆ is_uint8()

int mxArray::is_uint8 ( void  ) const
inline

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

References mxArray_base::is_uint8(), and rep.

Referenced by mxIsUint8().

◆ iscell()

int mxArray::iscell ( void  ) const
inline

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

References mxArray_base::iscell(), and rep.

Referenced by mxIsCell().

◆ isempty()

int mxArray::isempty ( void  ) const
inline

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

References get_number_of_elements().

Referenced by mxIsEmpty().

◆ malloc()

◆ maybe_mutate()

void mxArray::maybe_mutate ( void  ) const
private

Definition at line 2092 of file mex.cc.

References mxArray_base::is_octave_value(), mxArray_base::mutate(), and rep.

◆ mutate()

mxArray* mxArray::mutate ( void  ) const
inline

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

References mxArray_base::mutate(), and rep.

◆ mutation_needed()

bool mxArray::mutation_needed ( void  ) const
inline

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

References mxArray_base::mutation_needed(), and rep.

◆ operator=()

mxArray& mxArray::operator= ( const mxArray )
delete

◆ remove_field()

void mxArray::remove_field ( int  key_num)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxRemoveField().

◆ set_cell()

void mxArray::set_cell ( mwIndex  idx,
mxArray val 
)
inline

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

References DO_VOID_MUTABLE_METHOD, and val.

Referenced by mxSetCell().

◆ set_class_name()

void mxArray::set_class_name ( const char *  name_arg)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetClassName().

◆ set_data()

void mxArray::set_data ( void *  pr)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetData(), and mxSetPr().

◆ set_dimensions()

int mxArray::set_dimensions ( mwSize dims_arg,
mwSize  ndims_arg 
)
inline

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

References DO_MUTABLE_METHOD.

Referenced by mxSetDimensions().

◆ set_field_by_number()

void mxArray::set_field_by_number ( mwIndex  index,
int  key_num,
mxArray val 
)
inline

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

References DO_VOID_MUTABLE_METHOD, and val.

Referenced by mxSetFieldByNumber().

◆ set_imag_data()

void mxArray::set_imag_data ( void *  pi)
inline

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

References DO_VOID_MUTABLE_METHOD, and octave::math::pi.

Referenced by mxSetImagData(), and mxSetPi().

◆ set_ir()

void mxArray::set_ir ( mwIndex ir)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetIr().

◆ set_jc()

void mxArray::set_jc ( mwIndex jc)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetJc().

◆ set_m()

void mxArray::set_m ( mwSize  m)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetM().

◆ set_n()

void mxArray::set_n ( mwSize  n)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetN().

◆ set_name()

void mxArray::set_name ( const char *  name_arg)

Definition at line 2069 of file mex.cc.

References mxFree(), name, and strsave().

◆ set_nzmax()

void mxArray::set_nzmax ( mwSize  nzmax)
inline

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

References DO_VOID_MUTABLE_METHOD.

Referenced by mxSetNzmax().

◆ set_property()

void mxArray::set_property ( mwIndex  idx,
const char *  pname,
const mxArray pval 
)
inline

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

References pname, rep, and mxArray_base::set_property().

Referenced by mxSetProperty().

◆ strsave()

static char* mxArray::strsave ( const char *  str)
inlinestatic

Member Data Documentation

◆ name

char* mxArray::name
private

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

Referenced by dup(), get_name(), set_name(), and ~mxArray().

◆ rep


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