#include <Matrix.h>
where rows and cols are the number of rows and columns respectively.
S | type of matrix entries. |
MatrixBaseType: | UpperTriangular<S>, LowerTriangular<S>, Symmetric<S> or Rectangular<S>. |
Definition at line 735 of file Matrix.h.
Public Types | |
typedef MatrixBaseType::TransposeType | TransposeType |
Public Member Functions | |
void | deallocate () |
S ** | getData () const |
int | getRowIndexBase () const |
void | setRowIndexBase (int r) |
int | getColIndexBase () const |
void | setColIndexBase (int c) |
S & | operator() (int i, int j) |
const S & | operator() (int i, int j) const |
void | testEquals (const Matrix &B, S precision, S epsilon, string test) const |
Matrix (int dim, int c=0) | |
Matrix (int nRows, int nCols, int row_base, int col_base) | |
Matrix (const Matrix &A) | |
template<int dim> | Matrix (S A[dim][dim], int row_base=0, int col_base=0) |
Matrix & | operator= (const Matrix &B) |
Real | norm () const |
Real | rowNorm (int i) const |
Real | colNorm (int j) |
Matrix & | scaleRow (int i, Real f) |
Matrix & | scaleCol (int j, Real f) |
S | quadraticForm (const Vector< S > &x) const |
Matrix< S, TransposeType > & | transpose () const |
Matrix & | operator+= (const Matrix &B) |
Matrix & | operator *= (Real f) |
Matrix & | operator *= (const Matrix &B) |
Matrix & | operator^= (const Matrix< S, TransposeType > &B) |
Matrix< S, UpperTriangular< S > > & | aat () const |
Matrix & | exp () const |
std::ostream & | printSelf (std::ostream &os) const |
Protected Attributes | |
int | a |
int | b |
Static Protected Attributes | |
S | cache [SMALL][SMALL] = { } |
|
The type of the matrix: UpperTriangular<S>, LowerTriangular<S>,... |
|
Constructor for square matrix with both row and column index base = a, all components intialized with zeroes.
|
|
Rectangular matrix, all components intialized with zeroes.
|
|
Copy constructor, matrix types must be equal. |
|
Construct from square data array, zero based indices only. Cannot be extended to the nonsquare case as template parameters cannot be deduced. All matrix types, only the relevant array entries are used.
|
|
Definition at line 753 of file Matrix.h. Referenced by Matrix< Real, UpperTriangular< Real > >::operator *=(), and Matrix< Real, UpperTriangular< Real > >::operator^=(). |
|
Pointer to data. Definition at line 758 of file Matrix.h. Referenced by Matrix< Real, UpperTriangular< Real > >::operator *=(), and Matrix< Real, UpperTriangular< Real > >::operator^=(). |
|
Row index base a, row indices i=a,a+1,...,a+rows-1 Definition at line 761 of file Matrix.h. Referenced by Matrix< Real, UpperTriangular< Real > >::operator=(), and Matrix< Real, UpperTriangular< Real > >::testEquals(). |
|
Row index base set equal to r. Definition at line 763 of file Matrix.h. Referenced by Matrix< Real, UpperTriangular< Real > >::exp(). |
|
Column index base b, column indices j=b,b+1,...,b+cols-1 Definition at line 766 of file Matrix.h. Referenced by Matrix< Real, UpperTriangular< Real > >::operator=(), and Matrix< Real, UpperTriangular< Real > >::testEquals(). |
|
Column index base set equal to r. |
|
Subscripting relative to the index bases a,b, that is, we use indices
|
|
Subscripting relative to the index bases a,b, that is, we use indices
|
|
Test for entry by entry equality. Matrix types must be equal. Type S must support absolute value and comparison ">". Equality is defined by an upper bound on the acceptable relative error in percent.
|
|
Assignement, matrix types and sizes must be equal. |
|
Square root of sum of absolute values of entries squared. Type S must support absolute value Definition at line 915 of file Matrix.h. Referenced by Matrix< Real, UpperTriangular< Real > >::exp(). |
|
L2-norm of row i. Type S must have a function |
|
L2-norm of column j. Type S must have a function |
|
Multiplication of row i by scalar f. Uses row index i relative to the base. |
|
Multiplication of column j by scalar f. Uses column index j relative to the base. |
|
The quadratic form where C is the symmetric matrix of which this is the upper half. |
|
Transpose. Must allocate new memory to preserve row major order. |
|
Matrix addition. Dimensions and types must match (not checked), index bases need not. |
|
Multiplication of matrix by a Real scalar |
|
Multiplication on the right by the matrix B of the same type. Dimensional compatibility not checked. |
|
RIGHT multiplication of |
|
The upper half of the product |
|
Matrix exponential Reimplemented in UTRRealMatrix. |
|
|
|
|
|
|
|
|