Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
sparseqr::Driver Class Reference

Driver class for sparse QR decomposition. More...

#include <driver.hh>

Inheritance diagram for sparseqr::Driver:
Inheritance graph
[legend]
Collaboration diagram for sparseqr::Driver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Driver (const concepts::SparseMatrix< Real > &A)
 Constructor.
concepts::TrivExtendRestrict
< Real > * 
extension ()
 Returns the extension from the last n-r to n degrees of freedom.
void operator() (const concepts::Vector< Real > &fncY, concepts::Vector< Real > &fncX)
virtual void operator() (const concepts::Function< Real > &fncY, concepts::Function< Real > &fncX)
concepts::Permutation< Real > * Pcol ()
 Returns $P_c$.
concepts::Permutation< Real > * Prow ()
 Returns $P_r$.
sparseqr::GivensRotations< Real > * Q ()
 Returns $Q$.
sparseqr::GivensRotations< Real > * Qt ()
 Returns $Q^\top$.
int rank ()
 Returns the rank of the matrix.
concepts::TrivExtendRestrict
< Real > * 
restriction ()
 Returns the restriction from n to the last n-r degrees of freedom.
virtual ~Driver ()

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.

Private Types

typedef Cmplxtype< Real >::type c_type
 Real type of data type.
typedef Realtype< Real >::type r_type
 Real type of data type.
typedef Real type
 Type of data, e.g. matrix entries.

Private Member Functions

void compute_ ()
virtual const uint dimX () const
 Returns the size of the image space of the operator (number of rows of the corresponding matrix)
virtual const uint dimY () const
 Returns the size of the source space of the operator (number of columns of the corresponding matrix)
virtual void operator() (const Function< c_type > &fncY, Function< c_type > &fncX)
 Application operator for complex function fncY.
virtual void operator() (const Function< r_type > &fncY, Function< Real > &fncX)
 Application operator for real function fncY.

Private Attributes

const concepts::SparseMatrix
< Real > & 
A_
bool computed_
uint dimX_
 Dimension of image space and the source space.
uint dimY_
std::auto_ptr
< concepts::TrivExtendRestrict
< Real > > 
ext_
std::auto_ptr
< concepts::Permutation< Real > > 
Pcol_
concepts::Array< int > pcol_
concepts::Array< int > prow_
std::auto_ptr
< concepts::Permutation< Real > > 
Prow_
sparseqr::Qmatrix q_
std::auto_ptr
< sparseqr::GivensRotations
< Real > > 
Q_
std::auto_ptr< QRqr_
std::auto_ptr
< sparseqr::GivensRotations
< Real > > 
Qt_
int rank_
std::auto_ptr
< concepts::TrivExtendRestrict
< Real > > 
restr_

Detailed Description

Driver class for sparse QR decomposition.

Performs a QR factorization on a sparse mxn matrix A, m>=n, such that

\[ P_r \cdot Q^\top \cdot A \cdot P_c^\top = \begin{pmatrix} R \\ 0 \end{pmatrix} \]

the different matrices can be asked for individually. At the same time, this class can act as a linear solver using the QR decomposition of the matrix.

Author:
Philipp Frauenfelder, 2004
Test:

test::DriverTest

test::DeepCompositionsTest

Definition at line 32 of file driver.hh.


Member Typedef Documentation

typedef Cmplxtype<Real >::type concepts::Operator< Real >::c_type [inherited]
typedef Realtype<Real >::type concepts::Operator< Real >::r_type [inherited]
typedef Real concepts::Operator< Real >::type [inherited]

Type of data, e.g. matrix entries.

Definition at line 43 of file compositions.hh.


Constructor & Destructor Documentation

sparseqr::Driver::Driver ( const concepts::SparseMatrix< Real > &  A) [inline]

Constructor.

The constructor does not compute or copy anything, just initialises local variables.

Parameters:
AMatrix to decompose

Definition at line 39 of file driver.hh.

virtual sparseqr::Driver::~Driver ( ) [virtual]

Member Function Documentation

void sparseqr::Driver::compute_ ( ) [private]
virtual const uint concepts::Operator< Real >::dimX ( ) const [inline, virtual, inherited]

Returns the size of the image space of the operator (number of rows of the corresponding matrix)

Examples:
hpFEM2d-simple.cc, and hpFEM2d.cc.

Definition at line 87 of file compositions.hh.

virtual const uint concepts::Operator< Real >::dimY ( ) const [inline, virtual, inherited]

Returns the size of the source space of the operator (number of columns of the corresponding matrix)

Definition at line 92 of file compositions.hh.

concepts::TrivExtendRestrict<Real>* sparseqr::Driver::extension ( )

Returns the extension from the last n-r to n degrees of freedom.

virtual std::ostream& sparseqr::Driver::info ( std::ostream &  os) const [protected, virtual]

Returns information in an output stream.

Reimplemented from concepts::Operator< Real >.

void sparseqr::Driver::operator() ( const concepts::Vector< Real > &  fncY,
concepts::Vector< Real > &  fncX 
)
virtual void sparseqr::Driver::operator() ( const concepts::Function< Real > &  fncY,
concepts::Function< Real > &  fncX 
) [virtual]
virtual void concepts::Operator< Real >::operator() ( const Function< c_type > &  fncY,
Function< c_type > &  fncX 
) [virtual, inherited]

Application operator for complex function fncY.

Computes fncX = A(fncY) where A is this operator. fncX becomes complex.

In derived classes its enough to implement the operator() for complex Operator's. If a real counterpart is not implemented, the function fncY is splitted into real and imaginary part and the application operator for real functions is called for each. Then the result is combined.

If in a derived class the operator() for complex Operator's is not implemented, a exception is thrown from here.

Reimplemented in concepts::VecOperator< Real >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Matrix< Real >, concepts::Permutation< Real >, and concepts::SparseMatrix< Real >.

virtual void concepts::Operator< Real >::operator() ( const Function< r_type > &  fncY,
Function< Real > &  fncX 
) [virtual, inherited]

Application operator for real function fncY.

Computes fncX = A(fncY) where A is this operator.

fncX becomes the type of the operator, for real data it becomes real, for complex data it becomes complex.

In derived classes its enough to implement the operator() for real Operator's. If a complex counterpart is not implemented, the function fncY is transformed to a complex function and then the application operator for complex functions is called.

If in a derived class the operator() for real Operator's is not implemented, a exception is thrown from here.

Reimplemented in concepts::VecOperator< Real >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Matrix< Real >, concepts::Permutation< Real >, and concepts::SparseMatrix< Real >.

concepts::Permutation<Real>* sparseqr::Driver::Pcol ( )

Returns $P_c$.

concepts::Permutation<Real>* sparseqr::Driver::Prow ( )

Returns $P_r$.

sparseqr::GivensRotations<Real>* sparseqr::Driver::Q ( )

Returns $Q$.

sparseqr::GivensRotations<Real>* sparseqr::Driver::Qt ( )

Returns $Q^\top$.

int sparseqr::Driver::rank ( ) [inline]

Returns the rank of the matrix.

Definition at line 79 of file driver.hh.

Here is the call graph for this function:

concepts::TrivExtendRestrict<Real>* sparseqr::Driver::restriction ( )

Returns the restriction from n to the last n-r degrees of freedom.


Member Data Documentation

Definition at line 69 of file driver.hh.

Definition at line 70 of file driver.hh.

uint concepts::Operator< Real >::dimX_ [protected, inherited]

Dimension of image space and the source space.

Definition at line 96 of file compositions.hh.

uint concepts::Operator< Real >::dimY_ [protected, inherited]

Definition at line 96 of file compositions.hh.

std::auto_ptr<concepts::TrivExtendRestrict<Real> > sparseqr::Driver::ext_ [private]

Definition at line 73 of file driver.hh.

std::auto_ptr<concepts::Permutation<Real> > sparseqr::Driver::Pcol_ [private]

Definition at line 71 of file driver.hh.

Definition at line 74 of file driver.hh.

Definition at line 74 of file driver.hh.

std::auto_ptr<concepts::Permutation<Real> > sparseqr::Driver::Prow_ [private]

Definition at line 71 of file driver.hh.

Definition at line 76 of file driver.hh.

std::auto_ptr<sparseqr::GivensRotations<Real> > sparseqr::Driver::Q_ [private]

Definition at line 72 of file driver.hh.

std::auto_ptr<QR> sparseqr::Driver::qr_ [private]

Definition at line 75 of file driver.hh.

std::auto_ptr<sparseqr::GivensRotations<Real> > sparseqr::Driver::Qt_ [private]

Definition at line 72 of file driver.hh.

int sparseqr::Driver::rank_ [private]

Definition at line 68 of file driver.hh.

std::auto_ptr<concepts::TrivExtendRestrict<Real> > sparseqr::Driver::restr_ [private]

Definition at line 73 of file driver.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)