|
| | MxArray () |
| | Empty MxArray constructor.
|
| |
| MxArray & | operator= (std::nullptr_t) |
| | NULL assignment.
|
| |
| | MxArray (MxArray &&array) NOEXCEPT |
| | Move constructor.
|
| |
| MxArray & | operator= (MxArray &&rhs) NOEXCEPT |
| | Move assignment.
|
| |
| | MxArray (const mxArray *array) |
| | MxArray constructor from const mxArray*.
|
| |
| | MxArray (mxArray *array) |
| | MxArray constructor from mutable mxArray*.
|
| |
| MxArray & | operator= (const mxArray *rhs) |
| | Assignment from const mxArray*.
|
| |
| MxArray & | operator= (mxArray *rhs) |
| | Assignment from mutable mxArray*.
|
| |
| template<typename T > |
| | MxArray (const T &value) |
| | MxArray constructor from scalar.
|
| |
| virtual | ~MxArray () |
| | Destructor.
|
| |
| void | swap (MxArray &rhs) |
| | Swap operation.
|
| |
| void | reset (const mxArray *array=NULL) |
| | Reset an mxArray to a const mxArray*.
|
| |
| void | reset (mxArray *array) |
| | Reset an mxArray.
|
| |
| mxArray * | release () |
| | Release managed mxArray* pointer, or clone if not owner.
|
| |
| mxArray * | clone () const |
| | Clone mxArray.
|
| |
| const mxArray * | get () const |
| | Conversion to const mxArray*.
|
| |
| mxArray * | getMutable () |
| | Get raw mxArray*.
|
| |
| | operator bool () const |
| | Return true if the array is not NULL.
|
| |
| bool | isOwner () const |
| | Return true if owner.
|
| |
| template<typename T > |
| T | to () const |
| | Convert MxArray to a specified type.
|
| |
| template<typename T > |
| void | to (T *value) const |
| |
| template<typename T > |
| T | at (mwIndex index) const |
| | Template for element accessor.
|
| |
| template<typename T > |
| void | at (mwIndex index, T *value) const |
| |
| const mxArray * | at (mwIndex index) const |
| |
| template<typename T > |
| T | at (mwIndex row, mwIndex column) const |
| | Template for element accessor.
|
| |
| template<typename T > |
| T | at (const std::vector< mwIndex > &subscripts) const |
| | Template for element accessor.
|
| |
| template<typename T > |
| T | at (const std::string &field, mwIndex index=0) const |
| | Struct element accessor.
|
| |
| template<typename T > |
| void | at (const std::string &field, T *value, mwIndex index=0) const |
| |
| const mxArray * | at (const std::string &field, mwIndex index=0) const |
| |
| template<typename T > |
| void | set (mwIndex index, const T &value) |
| | Template for element write accessor.
|
| |
| template<typename T > |
| void | set (mwIndex row, mwIndex column, const T &value) |
| | Template for element write accessor.
|
| |
| template<typename T > |
| void | set (const std::vector< mwIndex > &subscripts, const T &value) |
| | Template for element write accessor.
|
| |
| void | set (mwIndex index, mxArray *value) |
| | Cell element write accessor.
|
| |
| void | set (mwIndex row, mwIndex column, mxArray *value) |
| | Cell element write accessor.
|
| |
| void | set (const std::vector< mwIndex > &subscripts, mxArray *value) |
| | Cell element write accessor.
|
| |
| template<typename T > |
| void | set (const std::string &field, const T &value, mwIndex index=0) |
| | Struct element write accessor.
|
| |
| void | set (const std::string &field, mxArray *value, mwIndex index=0) |
| | Struct element write accessor.
|
| |
| template<typename T > |
| T * | getData () const |
| | Get raw data pointer.
|
| |
| template<typename T > |
| T * | getImagData () const |
| | Get raw data pointer to imaginary part.
|
| |
| mxLogical * | getLogicals () const |
| |
| mxChar * | getChars () const |
| |
| mxClassID | classID () const |
| | Class ID of mxArray.
|
| |
| const std::string | className () const |
| | Class name of mxArray.
|
| |
| mwSize | size () const |
| | Number of elements in an array.
|
| |
| mwSize | dimensionSize () const |
| | Number of dimensions.
|
| |
| std::vector< mwSize > | dimensions () const |
| | Array of each dimension.
|
| |
| mwSize | rows () const |
| | Number of rows in an array.
|
| |
| mwSize | cols () const |
| | Number of columns in an array.
|
| |
| int | fieldSize () const |
| | Number of fields in a struct array.
|
| |
| std::string | fieldName (int index) const |
| | Get field name of a struct array.
|
| |
| std::vector< std::string > | fieldNames () const |
| | Get field names of a struct array.
|
| |
| mwSize | nonZeroMax () const |
| | Number of elements in IR, PR, and PI arrays.
|
| |
| mwIndex | subscriptIndex (mwIndex row, mwIndex column) const |
| | Offset from first element to desired element.
|
| |
| mwIndex | subscriptIndex (const std::vector< mwIndex > &subscripts) const |
| | Offset from first element to desired element.
|
| |
| bool | isCell () const |
| | Determine whether input is cell array.
|
| |
| bool | isChar () const |
| | Determine whether input is string array.
|
| |
| bool | isVector () const |
| | Determine whether input is vector array.
|
| |
| bool | isIntegral (const char *name) const |
| | Determine whether array is integral type.
|
| |
| bool | isClass (const char *name) const |
| | Determine whether array is member of specified class.
|
| |
| bool | isComplex () const |
| | Determine whether data is complex.
|
| |
| bool | isDouble () const |
| | Determine whether mxArray represents data as double-precision, floating-point numbers.
|
| |
| bool | isEmpty () const |
| | Determine whether array is empty.
|
| |
| bool | isFromGlobalWS () const |
| | Determine whether array was copied from MATLAB global workspace.
|
| |
| bool | isInt8 () const |
| | Determine whether array represents data as signed 8-bit integers.
|
| |
| bool | isInt16 () const |
| | Determine whether array represents data as signed 16-bit integers.
|
| |
| bool | isInt32 () const |
| | Determine whether array represents data as signed 32-bit integers.
|
| |
| bool | isInt64 () const |
| | Determine whether array represents data as signed 64-bit integers.
|
| |
| bool | isLogical () const |
| | Determine whether array is of type mxLogical.
|
| |
| bool | isLogicalScalar () const |
| | Determine whether scalar array is of type mxLogical.
|
| |
| bool | isLogicalScalarTrue () const |
| | Determine whether scalar array of type mxLogical is true.
|
| |
| bool | isNumeric () const |
| | Determine whether array is numeric.
|
| |
| bool | isSingle () const |
| | Determine whether array represents data as single-precision, floating-point numbers.
|
| |
| bool | isSparse () const |
| | Determine whether input is sparse array.
|
| |
| bool | isStruct () const |
| | Determine whether input is structure array.
|
| |
| bool | isUint8 () const |
| | Determine whether array represents data as unsigned 8-bit integers.
|
| |
| bool | isUint16 () const |
| | Determine whether array represents data as unsigned 16-bit integers.
|
| |
| bool | isUint32 () const |
| | Determine whether array represents data as unsigned 32-bit integers.
|
| |
| bool | isUint64 () const |
| | Determine whether array represents data as unsigned 64-bit integers.
|
| |
| bool | hasField (const std::string &field_name, mwIndex index=0) const |
| | Determine whether a struct array has a specified field.
|
| |
| int | elementSize () const |
| | Element size.
|
| |
|
| template<typename T > |
| static mxArray * | Numeric (int rows=1, int columns=1) |
| | Create a new numeric (real or complex) matrix.
|
| |
| template<typename T > |
| static mxArray * | Numeric (std::vector< std::size_t > dims) |
| | Create a new numeric (real or complex) matrix.
|
| |
| static mxArray * | Logical (int rows=1, int columns=1) |
| | Create a new logical matrix.
|
| |
| static mxArray * | Cell (int rows=1, int columns=1) |
| | Create a new cell matrix.
|
| |
| static mxArray * | Struct (int nfields=0, const char **fields=NULL, int rows=1, int columns=1) |
| | Generic constructor for a struct matrix.
|
| |
| template<typename T > |
| static mxArray * | from (const T &value) |
| | mxArray* importer methods.
|
| |
| static mxArray * | from (const char *value) |
| |
| static mxArray * | from (int32_t value) |
| |
| template<typename T > |
| static void | to (const mxArray *array, T *value) |
| | mxArray* exporter methods.
|
| |
| template<typename T > |
| static T | to (const mxArray *array) |
| |
| template<typename T > |
| static T | at (const mxArray *array, mwIndex index) |
| | mxArray* element reader methods.
|
| |
| template<typename T > |
| static void | at (const mxArray *array, mwIndex index, T *value) |
| |
| static const mxArray * | at (const mxArray *array, mwIndex index) |
| |
| template<typename T > |
| static void | at (const mxArray *array, const std::string &field, T *value, mwIndex index=0) |
| |
| static const mxArray * | at (const mxArray *array, const std::string &field, mwIndex index=0) |
| |
| template<typename T > |
| static void | set (mxArray *array, mwIndex index, const T &value) |
| | mxArray* element writer methods.
|
| |
| static void | set (mxArray *array, mwIndex index, mxArray *value) |
| |
| template<typename T > |
| static void | set (mxArray *array, const std::string &field, const T &value, mwIndex index=0) |
| |
| static void | set (mxArray *array, const std::string &field, mxArray *value, mwIndex index=0) |
| |
| static bool | IsFinite (double value) |
| | Determine whether input is finite.
|
| |
| static bool | IsInf (double value) |
| | Determine whether input is infinite.
|
| |
| static bool | IsNaN (double value) |
| | Determine whether input is NaN (Not-a-Number).
|
| |
| static double | Inf () |
| | Value of infinity.
|
| |
| static double | NaN () |
| | Value of NaN (Not-a-Number).
|
| |
| static double | Eps () |
| | Value of EPS.
|
| |
|
| template<typename T > |
| static mxArray * | fromInternal (const typename std::enable_if< MxArithmeticType< T >::value, T >::type &value) |
| | Templated mxArray importers
|
| |
| template<typename T > |
| static mxArray * | fromInternal (const typename std::enable_if< MxComplexType< T >::value, T >::type &value) |
| | Complex types, complex<float> or complex<double>.
|
| |
| template<typename Container > |
| static mxArray * | fromInternal (const typename std::enable_if< MxArithmeticCompound< Container >::value, Container >::type &value) |
| | Container with fundamental numerics, i.e.
|
| |
| template<typename Container > |
| static mxArray * | fromInternal (const typename std::enable_if< MxComplexCompound< Container >::value, Container >::type &value) |
| | Container with complex numbers, i.e.
|
| |
| template<typename T > |
| static mxArray * | fromInternal (const typename std::enable_if< MxCharType< T >::value, T >::type &value) |
| | Char type.
|
| |
| template<typename Container > |
| static mxArray * | fromInternal (const typename std::enable_if<(MxCharCompound< Container >::value) &&(std::is_signed< typename Container::value_type >::value), Container >::type &value) |
| | Containter with signed char.
|
| |
| template<typename Container > |
| static mxArray * | fromInternal (const typename std::enable_if<(MxCharCompound< Container >::value) &&!(std::is_signed< typename Container::value_type >::value), Container >::type &value) |
| | Container with unsigned char.
|
| |
| template<typename T > |
| static mxArray * | fromInternal (const typename std::enable_if< MxLogicalType< T >::value, T >::type &value) |
| | Logicals.
|
| |
| template<typename Container > |
| static mxArray * | fromInternal (const typename std::enable_if< MxLogicalCompound< Container >::value, Container >::type &value) |
| | Container with logicals.
|
| |
| template<typename Container > |
| static mxArray * | fromInternal (const typename std::enable_if< MxCellCompound< Container >::value, Container >::type &value) |
| | Container with cell type content.
|
| |
| template<typename T > |
| static void | toInternal (const mxArray *array, typename std::enable_if< MxArithmeticType< T >::value||MxComplexType< T >::value||MxLogicalType< T >::value||MxCharType< T >::value, T >::type *value) |
| | Templated mxArray exporters
|
| |
| template<typename T > |
| static void | toInternal (const mxArray *array, typename std::enable_if< MxComplexOrArithmeticCompound< T >::value||MxLogicalCompound< T >::value||MxCharCompound< T >::value, T >::type *value) |
| | Vector types.
|
| |
| template<typename T > |
| static void | toInternal (const mxArray *array, typename std::enable_if< MxCellType< T >::value &&(!std::is_compound< T >::value||MxCellType< typename T::value_type >::value), T >::type *value) |
| | Nested types (leads into recursive deduction).
|
| |
| template<typename T > |
| static void | atInternal (const mxArray *array, mwIndex index, typename std::enable_if< MxComplexOrArithmeticType< T >::value||MxLogicalType< T >::value||MxCharType< T >::value, T >::type *value) |
| | Templated mxArray getters
|
| |
| template<typename T > |
| static void | atInternal (const mxArray *array, mwIndex index, typename std::enable_if< std::is_compound< T >::value &&!MxComplexType< T >::value, T >::type *value) |
| | Converter for nested types.
|
| |
| template<typename T > |
| static void | atInternal (const mxArray *array, const std::string &field, mwIndex index, T *value) |
| | Structure access.
|
| |
| template<typename T > |
| static void | setInternal (mxArray *array, mwIndex index, const typename std::enable_if< !std::is_compound< T >::value||MxComplexType< T >::value, T >::type &value) |
| | Templated mxArray element setters
|
| |
| template<typename T > |
| static void | setInternal (mxArray *array, mwIndex index, const typename std::enable_if< MxCellType< T >::value, T >::type &value) |
| | Container types.
|
| |
| template<typename T > |
| static void | setInternal (mxArray *array, const std::string &field, mwIndex index, const T &value) |
| | Structure access.
|
| |
| template<typename T , typename R > |
| static void | assignTo (const mxArray *array, mwIndex index, typename std::enable_if< std::is_integral< R >::value, R >::type *value) |
| | Assignment helpers (for MxArray.to<type>(value))
|
| |
| template<typename T , typename R > |
| static void | assignTo (const mxArray *array, mwIndex index, typename std::enable_if< std::is_floating_point< R >::value, R >::type *value) |
| | Explicit floating point element assignment.
|
| |
| template<typename T , typename R > |
| static void | assignTo (const mxArray *array, mwIndex index, typename std::enable_if< MxComplexType< R >::value, R >::type *value) |
| | Explicit complex element assignment.
|
| |
| template<typename R > |
| static void | assignCharTo (const mxArray *array, mwIndex index, typename std::enable_if< std::is_signed< R >::value, R >::type *value) |
| | Explicit char (signed) element assignment.
|
| |
| template<typename R > |
| static void | assignCharTo (const mxArray *array, mwIndex index, typename std::enable_if< !std::is_signed< R >::value, R >::type *value) |
| | Explicit char (unsigned) element assignment.
|
| |
| template<typename T > |
| static void | assignCellTo (const mxArray *array, mwIndex index, T *value) |
| | Explicit cell element assignment.
|
| |
| template<typename T , typename R > |
| static void | assignTo (const mxArray *array, typename std::enable_if< MxArithmeticCompound< R >::value||MxLogicalCompound< R >::value||MxCharCompound< R >::value, R >::type *value) |
| | Explicit numeric array assignment.
|
| |
| template<typename T , typename R > |
| static void | assignTo (const mxArray *array, typename std::enable_if< MxComplexCompound< R >::value, R >::type *value) |
| | Explicit complex array assigment.
|
| |
| template<typename R > |
| static void | assignStringTo (const mxArray *array, typename std::enable_if< std::is_signed< typename R::value_type >::value, R >::type *value) |
| | Explicit char (signed) array assignment.
|
| |
| template<typename R > |
| static void | assignStringTo (const mxArray *array, typename std::enable_if< !std::is_signed< typename R::value_type >::value, R >::type *value) |
| | Explicit char (unsigned) array assignment.
|
| |
| template<typename T > |
| static void | assignCellTo (const mxArray *array, T *value) |
| | Explicit cell array assignment.
|
| |
| template<typename R , typename T > |
| static void | assignFrom (mxArray *array, mwIndex index, const typename std::enable_if< MxArithmeticType< T >::value||MxCharType< T >::value, T >::type &value) |
| | Assignment helpers (for MxArray.set<type>(i, value))
|
| |
| template<typename R , typename T > |
| static void | assignFrom (mxArray *array, mwIndex index, const typename std::enable_if< MxComplexType< T >::value, T >::type &value) |
| | Explicit complex element assignment.
|
| |
| template<typename T > |
| static void | assignCharFrom (mxArray *array, mwIndex index, const typename std::enable_if< std::is_floating_point< T >::value, T >::type &value) |
| |
| template<typename T > |
| static void | assignCharFrom (mxArray *array, mwIndex index, const typename std::enable_if< std::is_integral< T >::value &&std::is_signed< T >::value, T >::type &value) |
| |
| template<typename T > |
| static void | assignCharFrom (mxArray *array, mwIndex index, const typename std::enable_if< std::is_integral< T >::value &&!std::is_signed< T >::value, T >::type &value) |
| |
| template<typename T > |
| static void | assignCharFrom (mxArray *array, mwIndex index, const typename std::enable_if< MxComplexType< T >::value, T >::type &value) |
| |
mxArray object wrapper for data conversion and manipulation.
The class is similar to a combination of unique_ptr and wrapper around Matlab's matrix API. An MxArray object created from a mutable mxArray* pointer automatically frees its internal memory unless explicitly released. When MxArray is created from a const mxArray*, the object does not manage memory but still provides the same matrix API.