#include <matrixblock.hpp>
Public Types | |
typedef Eigen::Block < MatrixBase, Eigen::Dynamic, Eigen::Dynamic > | Base |
typedef Eigen::Matrix< TScalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > | MatrixBase |
typedef TScalar * | TBuffer |
typedef int | TEigenIndex |
typedef double | TScalar |
typedef unsigned int | TUnsignedIndex |
Public Member Functions | |
MatrixBase | __neg__ () const |
const char * | __str__ () const |
transforms this objects into a string, required by SWIG | |
void | Add (const MatrixBlock &other) |
modifies this matrix by the matrix sum A+B | |
void | Add (const Matrix &other) |
modifies this matrix by the matrix sum A+B | |
void | Assign (const MatrixBlock &ar) |
The assignment operator (copy by value). | |
void | Assign (const MatrixBase &ar) |
converts this matrix to a scalar (in case that it is a scalar) | |
MatrixBlock | Block (const TUnsignedIndex &row, const TUnsignedIndex &col, const TUnsignedIndex &numrows, const TUnsignedIndex &numcols) |
returns a reference to a block starting at 'row','column' with size 'numrows'*'numcols' | |
MatrixBlock | Col (const TUnsignedIndex &col) |
returns a reference to the 'col'th column | |
TUnsignedIndex | Cols () const |
returns the number of cols | |
void | Div (const TScalar &other) |
modifies this matrix by the scalar matrix quotient A/s | |
bool | IsApprox (const MatrixBlock &other, const TScalar &s) const |
returns true if other and this are approx. identical | |
bool | IsApprox (const MatrixBase &other, const TScalar &s) const |
returns true if other and this are approx. identical | |
bool | IsApproxToConstant (const TScalar &value, const TScalar &s) const |
returns true if array is constant and approx. equal s | |
bool | IsDiagonal (const TScalar &s) const |
returns true if array is a diagonal matrix by precision s | |
bool | IsIdentity (const TScalar &s) const |
returns true if array is the identity matrix by precision s | |
bool | IsLowerTriangular (const TScalar &s) const |
returns true if array is a lower triangular matrix by precision s | |
bool | IsScalar () const |
returns true if array is a scalar | |
bool | IsUnitary (const TScalar &s) const |
returns true if array is a unitary matrix by precision s (is an orthonormal basis) | |
bool | IsUpperTriangular (const TScalar &s) const |
returns true if array is an upper triangular matrix by precision s | |
bool | IsVector () const |
returns true if array is a vector | |
bool | IsZero (const TScalar &s) const |
returns true if array is a zero matrix by precision s | |
MatrixBlock (Matrix &x) | |
constructor from full Matrix | |
MatrixBlock (Matrix &x, const TUnsignedIndex &startRow, const TUnsignedIndex &startCol, const TUnsignedIndex &blockRows, const TUnsignedIndex &blockCols) | |
constructor from Matrix | |
MatrixBlock (const MatrixBlock &ar) | |
copy constructor | |
TScalar | MaxCoeff (TEigenIndex *row, TEigenIndex *col) const |
TScalar | MinCoeff (TEigenIndex *row, TEigenIndex *col) const |
void | Mul (const TScalar &other) |
modifies this matrix by the scalar matrix product A*s | |
MatrixBase | operator* (const TScalar &other) const |
returns the scalar matrix product A*s | |
MatrixBase | operator* (const MatrixBlock &other) const |
returns the matrix product A*B | |
MatrixBase | operator* (const Matrix &other) const |
returns the matrix product A*B | |
MatrixBase | operator+ (const MatrixBlock &other) const |
returns the matrix sum A+B | |
MatrixBase | operator+ (const Matrix &other) const |
returns the matrix sum A+B | |
MatrixBase | operator- (const MatrixBlock &other) const |
returns the matrix difference A-B | |
MatrixBase | operator- (const Matrix &other) const |
returns the matrix difference A-B | |
MatrixBase | operator/ (const TScalar &other) const |
returns the scalar matrix quotient A/s | |
MatrixBase | operator< (const TScalar &x) const |
returns a matrix of 1 and 0 indicating which element is less than x | |
MatrixBlock & | operator= (Matrix &ar) |
MatrixBlock & | operator= (MatrixBlock &ar) |
Sets the block to a block of another matrix. | |
MatrixBlock | Row (const TUnsignedIndex &row) |
returns a reference to the 'row'th row | |
TUnsignedIndex | Rows () const |
returns the number of rows | |
void | SetConstant (const TScalar &value) |
initializes the matrix with constant values | |
void | SetIdentity () |
initializes the matrix as identity matrix | |
void | SetLinearCols (const TScalar &a, const TScalar &b) |
initializes the matrix with linear columns | |
void | SetLinearRows (const TScalar &a, const TScalar &b) |
initializes the matrix with linear rows | |
void | SetOnes () |
initializes the matrix with constant values "1" | |
void | SetRandom () |
initializes the matrix with random values | |
void | SetZero () |
initializes the matrix with zeros | |
void | Sub (const MatrixBlock &other) |
modifies this matrix by the matrix difference A-B | |
void | Sub (const Matrix &other) |
modifies this matrix by the matrix difference A-B | |
MatrixBase | Transpose () const |
returns the transpose | |
virtual | ~MatrixBlock () |
destructor, | |
Protected Member Functions | |
const Matrix & | matrix () const |
Matrix & | matrix () |
Protected Attributes | |
Matrix * | m_matrix |
a reference to the linked matrix; | |
TUnsignedIndex | m_start_col |
TUnsignedIndex | m_start_row |
Objects of this kind do not create a data buffer, but use the data buffer of an existing Matrix object. The object saves the indices of the part of the refered matrix object it refers to (start position and size). A matrix block may represent a view onto
By using a reference counting system it is guaranteed that the refered object will not be deleted before the MatrixBlock is deleted.
MatrixBase tmath::MatrixBlock::__neg__ | ( | ) | const [inline] |
returns unary minus (B=-A)
void tmath::MatrixBlock::Assign | ( | const MatrixBase & | ar | ) |
converts this matrix to a scalar (in case that it is a scalar)
The assignment operator (copy by value)
TScalar tmath::MatrixBlock::MaxCoeff | ( | TEigenIndex * | row, | |
TEigenIndex * | col | |||
) | const [inline] |
find the largest element in the array returns the maximum element in the array
row | will be modified and will contain the row position of the found value on return | |
col | will be modified and will contain the column position of the found value on return |
TScalar tmath::MatrixBlock::MinCoeff | ( | TEigenIndex * | row, | |
TEigenIndex * | col | |||
) | const [inline] |
find the smallest element in the array returns the minimum element in the array
row | will be modified and will contain the row position of the found value on return | |
col | will be modified and will contain the column position of the found value on return |