SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes
DecompQR< T > Class Template Reference

Defines the QR decomposition algorithm of a square matrix. More...

#include <DecompQR.hh>

Public Member Functions

 DecompQR ()
 Default constructor, initilizes an empty matrix of dimension 0x0. More...
 
 DecompQR (const std::vector< std::vector< T >> &mat)
 Std constructor, sets the underlying std matrix. More...
 
 DecompQR (const DecompQR &decQR)
 Copy constructor. More...
 
DecompQR & operator= (const DecompQR &decQR)
 Equality operator. More...
 
 ~DecompQR ()
 Destructor. More...
 
void DecomposeGramSchmidt (const std::vector< std::vector< T >> &mat)
 Decomposes a square matrix into a parity matrix P, an orthogonal matrix Q and a right triangular matrix R. More...
 
T Determinant ()
 Returns the determinant of the decomposed matrix. More...
 
std::vector< std::vector< T > > NewMatrix (size_t m, size_t n)
 Returns a matrix of m rows and n columns. More...
 
T DotProduct (const std::vector< T > &a, const std::vector< T > &b)
 Returns the dot produt of two vectors. More...
 
const std::vector< std::vector
< T > > & 
Q ()
 Gets and returns the lower triangular matrix. More...
 
const std::vector< std::vector
< T > > & 
R ()
 Gets and returns the upper triangular matrix. More...
 

Private Attributes

std::vector< std::vector< T > > _Q
 Q Matrix. More...
 
std::vector< std::vector< T > > _R
 R Matrix. More...
 

Detailed Description

template<typename T>
class DecompQR< T >

Defines the QR decomposition algorithm of a square matrix.

The matrices Q and R are such that $A = QR$ with

Constructor & Destructor Documentation

template<typename T >
DecompQR< T >::DecompQR ( )

Default constructor, initilizes an empty matrix of dimension 0x0.

template<typename T >
DecompQR< T >::DecompQR ( const std::vector< std::vector< T >> &  mat)

Std constructor, sets the underlying std matrix.

template<typename T >
DecompQR< T >::DecompQR ( const DecompQR< T > &  decQR)

Copy constructor.

template<typename T >
DecompQR< T >::~DecompQR ( )

Destructor.

Member Function Documentation

template<typename T >
void DecompQR< T >::DecomposeGramSchmidt ( const std::vector< std::vector< T >> &  mat)

Decomposes a square matrix into a parity matrix P, an orthogonal matrix Q and a right triangular matrix R.

Parameters
matInput square matrix
Returns
True if successful
template<typename T>
T DecompQR< T >::Determinant ( )

Returns the determinant of the decomposed matrix.

Returns
Determinant of (P^{-1}QR)
template<typename T >
T DecompQR< T >::DotProduct ( const std::vector< T > &  a,
const std::vector< T > &  b 
)

Returns the dot produt of two vectors.

Parameters
aFirst vector
bSecond vector
Returns
Dot product of the two vectors
template<typename T >
std::vector< std::vector< T > > DecompQR< T >::NewMatrix ( size_t  m,
size_t  n 
)

Returns a matrix of m rows and n columns.

Parameters
mNumber of rows
nNumber of coQRmns
Returns
True if successful
template<typename T >
DecompQR< T > & DecompQR< T >::operator= ( const DecompQR< T > &  decQR)

Equality operator.

template<typename T>
const std::vector<std::vector<T> >& DecompQR< T >::Q ( )
inline

Gets and returns the lower triangular matrix.

template<typename T>
const std::vector<std::vector<T> >& DecompQR< T >::R ( )
inline

Gets and returns the upper triangular matrix.

Field Documentation

template<typename T>
std::vector<std::vector<T> > DecompQR< T >::_Q
private

Q Matrix.

template<typename T>
std::vector<std::vector<T> > DecompQR< T >::_R
private

R Matrix.


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