Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
Saf::Math::Algebra::SquareMatrix< N, T > Class Template Reference

Class representing square matrices from linear algebra. More...

#include <SquareMatrix.h>

Inheritance diagram for Saf::Math::Algebra::SquareMatrix< N, T >:
Saf::Math::Algebra::Matrix< N, N, T > Saf::Collection::StaticArray< N *M, T >

List of all members.

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.
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.

Detailed Description

template<Size N, class T>
class Saf::Math::Algebra::SquareMatrix< N, T >

Class representing square matrices from linear algebra.

Todo:
Tuto tridu spis nahradit mnozinou metod operujicich na Matrix<N,N>
            @tparam N Number of rows and columns.
            @tparam T %Data type.

Constructor & Destructor Documentation

template<Size N, class T>
Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix ( ) [inline]

Default constructor.

No initialization of the data is done.

template<Size N, class T>
Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix ( const T &  val) [inline, explicit]

Constructor.

Parameters:
[in]valAll matrix elements will be set to given val.
template<Size N, class T>
Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix ( const Matrix< N, N, T > &  m) [inline, explicit]

Constructor.

template<Size N, class T>
Saf::Math::Algebra::SquareMatrix< N, T >::SquareMatrix ( const Vector< N, T > &  v) [inline, explicit]

Constructor.

Parameters:
[in]vVector to be put on the main diagonal of the matrix. All other elements will be zero.

Member Function Documentation

template<Size N, class T>
T Saf::Math::Algebra::SquareMatrix< N, T >::Determinant ( ) const [inline]

Calculate the determinant of the matrix.

template<Size N, class T>
static SquareMatrix<N,T> Saf::Math::Algebra::SquareMatrix< N, T >::Identity ( ) [inline, static]

Returns identity matrix.

template<Size N, class T>
Vector<N,T> Saf::Math::Algebra::SquareMatrix< N, T >::MainDiagonal ( ) const [inline]

Get main diagonal as a vector.

template<Size N, class T>
SquareMatrix<N,T>& Saf::Math::Algebra::SquareMatrix< N, T >::SetIdentity ( ) [inline]

Set the matrix to identity.

template<Size N, class T>
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.


The documentation for this class was generated from the following file: