class for simple loops for matrix operations More...
#include <TinyMatrix.hxx>
Public Member Functions | |
template<int m, int n, class T , class Prop > | |
void | Zero (TinyMatrix< T, Prop, m, n > &A) |
sets all elements of the matrix to 0 | |
Static Public Member Functions | |
template<int m, int n, class T0 , class Prop > | |
static void | Zero (TinyMatrix< T0, Prop, m, n > &A) |
template<int m, int n, class T0 , class T1 > | |
static void | Init (const TinyVector< TinyVector< T0, m >, n > &x, TinyMatrix< T1, General, m, n > &A) |
Conversion from vector of vectors to matrix. | |
template<int m, int n, class T0 , class Prop , class T1 > | |
static void | MltScal (const T0 &alpha, TinyMatrix< T1, Prop, m, n > &A) |
A = alpha*A. | |
template<int m, int n, class T1 , class E , class T0 , class Prop > | |
static void | Copy (const TinyMatrixExpression< T1, m, n, E > &x, TinyMatrix< T0, Prop, m, n > &y) |
y = x | |
template<int m, int n, class T1 , class E , class T0 , class Prop > | |
static void | AddCopy (const TinyMatrixExpression< T1, m, n, E > &x, TinyMatrix< T0, Prop, m, n > &y) |
y += x | |
template<int m, int n, class T1 , class E , class T0 , class Prop > | |
static void | DiffCopy (const TinyMatrixExpression< T1, m, n, E > &x, TinyMatrix< T0, Prop, m, n > &y) |
y -= x | |
template<int m, int n, class T , class Prop > | |
static void | SetIdentity (TinyMatrix< T, Prop, m, n > &A) |
sets matrix to the identity matrix | |
template<int m, int n, class T , class Prop , class T0 > | |
static void | SetDiagonal (TinyMatrix< T, Prop, m, n > &A, const T0 &diag) |
sets matrix to the identity matrix multiplied by a coefficient alpha | |
template<int m, int n, class T , class Prop > | |
static void | Fill (TinyMatrix< T, Prop, m, n > &A) |
sets matrix to [0, 1, 2; 3, 4, 5 ...] | |
template<int m, int n, class T , class Prop > | |
static void | FillRand (TinyMatrix< T, Prop, m, n > &A) |
sets randomly all the elements of A | |
template<int m, int n, class T , class Prop , class T0 > | |
static void | Fill (TinyMatrix< T, Prop, m, n > &A, const T0 &alpha) |
sets all the elements of A to a given value | |
template<int m, int n, class Prop , class T > | |
static bool | IsZero (const TinyMatrix< T, Prop, m, n > &A) |
returns true if the matrix is null | |
template<int m, int n, class T , class E > | |
static void | WriteText (ostream &out, const TinyMatrixExpression< T, m, n, E > &A) |
writes matrix A in ascii format | |
template<int m, int n, class T , class Prop > | |
static void | Write (ostream &out, const TinyMatrix< T, Prop, m, n > &A) |
writes matrix A in binary format | |
template<int m, int n, class T , class E1 , class E2 > | |
static bool | IsEqual (const TinyMatrixExpression< T, m, n, E1 > &A, const TinyMatrixExpression< T, m, n, E2 > &B) |
returns true if A == B | |
template<int m, int n, class T0 , class E0 , class T1 , class E1 , class T2 > | |
static void | Mlt (const TinyMatrixExpression< T0, m, n, E0 > &A, const TinyVectorExpression< T1, n, E1 > &x, TinyVector< T2, m > &y) |
y = A*x | |
template<int m, int n, class T0 , class E0 , class T1 , class E1 , class T2 > | |
static void | MltAdd (const TinyMatrixExpression< T0, m, n, E0 > &A, const TinyVectorExpression< T1, n, E1 > &x, TinyVector< T2, m > &y) |
y = y + A*x | |
template<int m, int n, class T0 , class E0 , class T1 , class E1 , class T2 , class T3 > | |
static void | MltAdd (const T3 &alpha, const TinyMatrixExpression< T0, m, n, E0 > &A, const TinyVectorExpression< T1, n, E1 > &x, TinyVector< T2, m > &y) |
y = y + alpha*A*x | |
template<int m, int n, int k, class T0 , class E0 , class T1 , class E1 , class T2 , class Prop2 > | |
static void | Mlt (const TinyMatrixExpression< T0, m, n, E0 > &A, const TinyMatrixExpression< T1, n, k, E1 > &B, TinyMatrix< T2, Prop2, m, k > &C) |
C = A*B. | |
template<int m, int n, class T0 , class T1 , class E1 , class T2 , class E2 , class T3 > | |
static void | Rank1Update (const T0 &alpha, const TinyVectorExpression< T1, m, E1 > &x, const TinyVectorExpression< T2, n, E2 > &y, TinyMatrix< T3, General, m, n > &A) |
A = A + alpha * x y^T. | |
template<int m, int n, class T1 , class E1 , class T2 , class E2 , class T3 > | |
static void | Rank1Matrix (const TinyVectorExpression< T1, m, E1 > &x, const TinyVectorExpression< T2, n, E2 > &y, TinyMatrix< T3, General, m, n > &A) |
A = x y^T. | |
template<int m, class T0 , class T1 , class E1 , class T3 > | |
static void | Rank1Update (const T0 &alpha, const TinyVectorExpression< T1, m, E1 > &x, TinyMatrix< T3, Symmetric, m, m > &A) |
A = A + alpha * x x^T. | |
template<int m, class T1 , class E1 , class T3 > | |
static void | Rank1Matrix (const TinyVectorExpression< T1, m, E1 > &x, TinyMatrix< T3, Symmetric, m, m > &A) |
A = x x^T. | |
template<int m, int n, class T1 , class E1 > | |
static void | GetCol (const TinyMatrixExpression< T1, m, n, E1 > &A, int k, TinyVector< T1, m > &x) |
x = A(:, k) | |
template<int m, int n, class T0 , class E0 , class T1 > | |
static void | GetRow (const TinyMatrixExpression< T0, m, n, E0 > &A, int k, TinyVector< T1, n > &x) |
x = A(k, :) | |
template<int m, int n, class T1 , class E1 , class Prop > | |
static void | SetCol (const TinyVectorExpression< T1, m, E1 > &x, int k, TinyMatrix< T1, Prop, m, n > &A) |
A(:, k) = x. | |
template<int m, int n, class T1 , class E1 , class Prop > | |
static void | SetRow (const TinyVectorExpression< T1, n, E1 > &x, int k, TinyMatrix< T1, Prop, m, n > &A) |
A(k, :) = x. | |
template<int m, int n, class T , class Prop , class T0 > | |
static void | GetMaxAbs (const TinyMatrix< T, Prop, m, n > &A, T0 &amax) |
computes the maximal element of matrix A | |
template<class T , int m> | |
static void | PivotGauss (TinyMatrix< T, General, m, m > &A, TinyVector< int, m > &pivot) |
step i1 of Gauss elimination | |
template<class T , int m> | |
static void | SolveUpper (TinyMatrix< T, General, m, m > &A) |
solving by upper matrix | |
template<class T , int m> | |
static void | PermuteColumn (TinyMatrix< T, General, m, m > &A, const TinyVector< int, m > &pivot) |
swapping columns for Gauss pivoting | |
template<class T , int m> | |
static void | GetCholesky (TinyMatrix< T, Symmetric, m, m > &A) |
main loop for Cholesky factorisation | |
template<class T , class T2 , int m> | |
static void | SolveCholesky (const class_SeldonNoTrans &trans, const TinyMatrix< T, Symmetric, m, m > &A, TinyVector< T2, m > &x) |
simple loop for Cholesky resolution and NoTranspose | |
template<class T , class T2 , int m> | |
static void | SolveCholesky (const class_SeldonTrans &trans, const TinyMatrix< T, Symmetric, m, m > &A, TinyVector< T2, m > &x) |
simple loop for Cholesky resolution and Transpose | |
template<class T , class T2 , int m> | |
static void | MltCholesky (const class_SeldonTrans &trans, const TinyMatrix< T, Symmetric, m, m > &A, TinyVector< T2, m > &x) |
simple loop for Cholesky multiplication and Transpose | |
template<class T , class T2 , int m> | |
static void | MltCholesky (const class_SeldonNoTrans &trans, const TinyMatrix< T, Symmetric, m, m > &A, TinyVector< T2, m > &x) |
simple loop for Cholesky multiplication and No Transpose | |
class for simple loops for matrix operations
Definition at line 22 of file TinyMatrix.hxx.