|
| Array (std::string name="untitled array") |
|
| Array (int nrows, int ncols=1, std::string name="untitled array", bool moveable=false) |
|
| Array (const mxArray *mxarray, std::string name="untitled mxArray", bool moveable=false, bool dataCopy=false) |
|
| Array (const _Scalar *data, int nrows, int ncols=1, std::string name="untitled data", bool moveable=false, bool releaseData=false) |
|
| Array (Array< _Scalar > &array) |
|
| ~Array () |
|
void | empty () |
|
Array< _Scalar > & | operator= (Array< _Scalar > &array) |
|
_Scalar * | getData () |
|
mxArray * | getmxArray () |
|
bool | isShared () |
|
int | getWidth () |
|
int | getNCols () |
|
int | getNRows () |
|
std::string | getName () |
|
_Scalar & | operator[] (int i) |
|
_Scalar & | operator() (int row, int col) |
|
void | init (_Scalar x=0) |
|
void | reshape (int nrows, int ncols) |
|
void | print () |
|
void | operator+= (_Scalar x) |
|
void | operator-= (_Scalar x) |
|
void | operator *= (_Scalar x) |
|
void | operator/= (_Scalar x) |
|
Array< _Scalar > | operator+ (_Scalar x) |
|
Array< _Scalar > | operator- (_Scalar x) |
|
Array< _Scalar > | operator * (_Scalar x) |
|
Array< _Scalar > | operator/ (_Scalar x) |
|
void | operator+= (const Array< _Scalar > &operand) |
|
void | operator-= (const Array< _Scalar > &operand) |
|
void | operator *= (const Array< _Scalar > &operand) |
|
void | operator/= (const Array< _Scalar > &operand) |
|
bool | operator== (const Array< _Scalar > &operand) |
|
_Scalar | getMax () |
|
_Scalar | getMin () |
|
Array< _Scalar > | operator- () |
|
template<typename _Scalar>
class Array< _Scalar >
Array is a template array class allowing element-wise operations.
Array is used to access input, output and parameter ports as well as MATLAB mxArray.
Definition at line 25 of file Array.h.
template<typename _Scalar>
Array< _Scalar >::Array |
( |
const _Scalar * |
data, |
|
|
int |
nrows, |
|
|
int |
ncols = 1 , |
|
|
std::string |
name = "untitled data" , |
|
|
bool |
moveable = false , |
|
|
bool |
releaseData = false |
|
) |
| |
|
inline |
Construct an Array with already allocated data without using mxArray. The constructor do NOT allocate and NOT copy the data.
Set moveable to true if the Array is used as a return value (and to avoid data copy in this case).
Set releaseData to true if the Array must free the memory during deletion.
Definition at line 99 of file Array.h.
template<typename _Scalar>
Array assignment. The method generally does a copy of the data. If the argument is moveable, the data are stolen to this argument before its deletion (no data copy).
Throws an exception if the data is shared and sizes don't match.
Definition at line 167 of file Array.h.