SM_CTRL
1.0
Управление генератором сигналов
|
#include <array.h>
Public Member Functions | |
Array (string name="untitled array") | |
Array (int nrows, int ncols=1, string name="untitled array", bool moveable=false) | |
Array (const mxArray *mxarray, string name="untitled mxArray", bool moveable=false, bool dataCopy=false) | |
Array (const double *data, int nrows, int ncols=1, string name="untitled data", bool moveable=false, bool releaseData=false) | |
Array (const Array &array) | |
~Array () | |
void | empty () |
void | operator= (const Array &array) |
double * | getData () |
mxArray * | getmxArrayCopy () const |
bool | isShared () |
int | getWidth () |
int | getNCols () |
int | getNRows () |
string | getName () |
double & | operator[] (int i) |
double & | operator() (int row, int col) |
void | init (double x=0) |
void | reshape (int nrows, int ncols) |
void | print () |
Array | callMatlab (string cmd) |
Array | callMatlab (string cmd, const Array &operand2) |
Array | callMatlab (string cmd, double operand2) |
void | operator+= (double x) |
void | operator-= (double x) |
void | operator*= (double x) |
void | operator/= (double x) |
Array | operator+ (double x) |
Array | operator- (double x) |
Array | operator* (double x) |
Array | operator/ (double x) |
void | operator+= (const Array &operand) |
void | operator-= (const Array &operand) |
void | operator*= (const Array &operand) |
void | operator/= (const Array &operand) |
Array | operator+ (const Array &operand) |
Array | operator- (const Array &operand) |
Array | operator* (const Array &operand) |
bool | operator== (const Array &operand) |
double | getMax () |
double | getMin () |
Array | opposite () |
Array | inverse () |
Static Public Member Functions | |
static Array | eye (int nrows, int ncols, string name="eye array") |
Protected Member Functions | |
void | stealData (const Array &array) |
void | copyOf (const Array &array) |
string | getFullName () |
Protected Attributes | |
int | ncols |
int | nrows |
mxArray * | mxarray |
double * | data |
string | name |
bool | moveable |
bool | releaseData |
Array is the fundamental class underlying easyLink data manipulation.
Array is used to access simulink input, output and parameter ports as well as MATLAB matrix and mxArray.
Array provides intuitive functions and operators to perform various operations using a MATLAB like interface.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Call internal MATLAB numeric functions, MATLAB operators, or user-defined functions and applied it to the array and to a second operand.
Definition at line 390 of file array.h.
References getmxArrayCopy(), mxarray, and name.
|
inline |
Call internal MATLAB numeric functions, MATLAB operators, or user-defined functions and applied it to the array and to a second scalar operand.
Definition at line 421 of file array.h.
References toString().
|
inlineprotected |
|
inline |
|
inlinestatic |
|
inline |
Move assignment. C++ 2011 only. Returns the address of the data.
Definition at line 256 of file array.h.
Referenced by BaseBlock::setDerivativeStateArray(), BaseBlock::setDiscreteStateArray(), BaseFunction::setOutputArray(), and BaseBlock::setOutputArray().
|
inlineprotected |
Definition at line 708 of file array.h.
References toString().
|
inline |
|
inline |
|
inline |
Returns a copy of the array within a mxArray (data copy).
The obtained mxArray must be released using mxDestroyArray.
Definition at line 264 of file array.h.
Referenced by callMatlab().
|
inline |
Returns the name of the array.
Definition at line 299 of file array.h.
Referenced by BaseBlock::setDerivativeStateArray(), BaseBlock::setDiscreteStateArray(), BaseFunction::setOutputArray(), and BaseBlock::setOutputArray().
|
inline |
Returns the number of columns of the array.
Definition at line 287 of file array.h.
Referenced by BaseBlock::setDerivativeStateArray(), BaseBlock::setDiscreteStateArray(), BaseFunction::setOutputArray(), and BaseBlock::setOutputArray().
|
inline |
Returns the number of rows of the array.
Definition at line 293 of file array.h.
Referenced by BaseBlock::setDerivativeStateArray(), BaseBlock::setDiscreteStateArray(), BaseFunction::setOutputArray(), and BaseBlock::setOutputArray().
|
inline |
Returns the number of elements of the array. For 1-D array with w elements, this method returns w. For M-by-N array, this method returns m*n.
Definition at line 281 of file array.h.
Referenced by BaseBlock::setDerivativeStateArray(), BaseBlock::setDiscreteStateArray(), BaseFunction::setOutputArray(), and BaseBlock::setOutputArray().
|
inline |
|
inline |
|
inline |
|
inline |
Read/write access to the element (row,col) of the array. Range errors throw an exception.
Definition at line 316 of file array.h.
References toString().
|
inline |
Array-double multiplication.
Definition at line 501 of file array.h.
References moveable, name, and toString().
|
inline |
|
inline |
|
inline |
Array-double addition.
Definition at line 481 of file array.h.
References moveable, name, and toString().
|
inline |
|
inline |
|
inline |
Array-double substraction.
Definition at line 491 of file array.h.
References moveable, name, and toString().
|
inline |
|
inline |
|
inline |
Array-double division.
Definition at line 511 of file array.h.
References moveable, name, and toString().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Read/write access to the element i of the array. i can go from 0 to nrows*ncols-1. Range errors throw an exception.
Definition at line 307 of file array.h.
References toString().
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
protected |
Definition at line 677 of file array.h.
Referenced by copyOf(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), opposite(), and stealData().
|
protected |
Definition at line 679 of file array.h.
Referenced by Array(), operator*(), operator+(), operator-(), operator/(), operator=(), and opposite().
|
protected |
Definition at line 676 of file array.h.
Referenced by callMatlab(), and stealData().
|
protected |
Definition at line 678 of file array.h.
Referenced by Array(), callMatlab(), copyOf(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), opposite(), and stealData().
|
protected |
Definition at line 675 of file array.h.
Referenced by copyOf(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), and stealData().
|
protected |
Definition at line 675 of file array.h.
Referenced by copyOf(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), and stealData().
|
protected |
Definition at line 679 of file array.h.
Referenced by stealData().