|
Simple Application Framework
1
|
Class representing square matrices from linear algebra. More...
#include <SquareMatrix.h>
Public Member Functions | |
| SquareMatrix () | |
| Default constructor. | |
| SquareMatrix (const T &val) | |
| Constructor. | |
| SquareMatrix (const Matrix< N, N, T > &m) | |
| Constructor. | |
| SquareMatrix (const Vector< N, T > &v) | |
| Constructor. | |
| T | Determinant () const |
| Calculate the determinant of the matrix. | |
| Vector< N, T > | MainDiagonal () const |
| Get main diagonal as a vector. | |
| SquareMatrix< N, T > & | SetIdentity () |
| Set the matrix to identity. | |
| SquareMatrix< N, T > & | SetMainDiagonal (const Vector< N, T > &v) |
| Set main diagonal of the matrix to given vector. | |
Static Public Member Functions | |
| static SquareMatrix< N, T > | Identity () |
| Returns identity matrix. | |
Class representing square matrices from linear algebra.
@tparam N Number of rows and columns.
@tparam T %Data type.| Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix | ( | ) | [inline] |
Default constructor.
No initialization of the data is done.
| Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix | ( | const T & | val | ) | [inline, explicit] |
Constructor.
| [in] | val | All matrix elements will be set to given val. |
| Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix | ( | const Matrix< N, N, T > & | m | ) | [inline, explicit] |
Constructor.
| Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix | ( | const Vector< N, T > & | v | ) | [inline, explicit] |
Constructor.
| [in] | v | Vector to be put on the main diagonal of the matrix. All other elements will be zero. |
| T Saf::Math::Algebra::SquareMatrix< N, T >::Determinant | ( | ) | const [inline] |
Calculate the determinant of the matrix.
| static SquareMatrix<N,T> Saf::Math::Algebra::SquareMatrix< N, T >::Identity | ( | ) | [inline, static] |
Returns identity matrix.
| Vector<N,T> Saf::Math::Algebra::SquareMatrix< N, T >::MainDiagonal | ( | ) | const [inline] |
Get main diagonal as a vector.
| SquareMatrix<N,T>& Saf::Math::Algebra::SquareMatrix< N, T >::SetIdentity | ( | ) | [inline] |
Set the matrix to identity.
| SquareMatrix<N,T>& Saf::Math::Algebra::SquareMatrix< N, T >::SetMainDiagonal | ( | const Vector< N, T > & | v | ) | [inline] |
Set main diagonal of the matrix to given vector.
Remaining matrix elements are set to zero.
1.8.0