SCV
4.2.1
Simple Components for Visual
|
A generic object matrix with basic functions. More...
#include <MatrixTemplate.h>
Public Member Functions | |
virtual | ~MatrixTemplate (void) |
MatrixTemplate (void) | |
Default Constructor. | |
MatrixTemplate (unsigned int width, unsigned int height) | |
Constructor. | |
MatrixTemplate (unsigned int width, unsigned int height, const T &rhs) | |
Constructor. | |
MatrixTemplate (const MatrixTemplate &rhs) | |
Copy Constructor. | |
MatrixTemplate & | operator= (const MatrixTemplate &rhs) |
Operator "Basic Assignment". | |
T & | operator() (unsigned int l, unsigned int c) |
Operator "Function Call". | |
bool | operator== (const MatrixTemplate< T > &rhs) const |
Operator "Equal To". | |
int | getWidth (void) const |
Gets the width of the matrix. | |
int | getHeight (void) const |
Gets the height of the matrix. | |
T & | get (unsigned int l, unsigned int c) |
Gets one element of the matrix by reference. | |
std::vector< T > & | getData (void) |
Gets the data vector of the matrix by reference;. | |
void | set (const scv::Point &p, T rhs) |
Sets a new object to a specified position of the matrix. | |
void | set (unsigned int l, unsigned int c, T rhs) |
Sets a new object to a specified position of the matrix. | |
bool | isValid (const scv::Point &p) |
Gets a boolean that specifies if the input position of the matrix is valid. | |
bool | isValid (unsigned int l, unsigned int c) |
Gets a boolean that specifies if the input position of the matrix is valid. | |
void | resize (unsigned int l, unsigned int c) |
Resize the matrix. | |
Protected Attributes | |
unsigned int | _width |
unsigned int | _height |
std::vector< T > | _data |
A generic object matrix with basic functions.
|
inlinevirtual |
|
inline |
Default Constructor.
|
inline |
Constructor.
width | Width of the matrix. |
height | Height of the matrix. |
|
inline |
Constructor.
width | Width of the matrix. |
height | Height of the matrix. |
rhs | The initialization value of the matrix. |
|
inline |
Copy Constructor.
|
inline |
Gets one element of the matrix by reference.
l | Line |
c | Column |
|
inline |
Gets the data vector of the matrix by reference;.
|
inline |
Gets the height of the matrix.
|
inline |
Gets the width of the matrix.
|
inline |
Gets a boolean that specifies if the input position of the matrix is valid.
|
inline |
Gets a boolean that specifies if the input position of the matrix is valid.
|
inline |
Operator "Function Call".
|
inline |
Operator "Basic Assignment".
|
inline |
Operator "Equal To".
|
inline |
Resize the matrix.
l | New number of lines. |
c | New number of columns. |
|
inline |
Sets a new object to a specified position of the matrix.
|
inline |
Sets a new object to a specified position of the matrix.
|
protected |
|
protected |
|
protected |