linbox
Public Member Functions
LQUPMatrix< Field > Class Template Reference

LQUP factorisation. More...

#include <factorized-matrix.h>

Public Member Functions

template<class _Rep >
 LQUPMatrix (const BlasMatrix< Field, _Rep > &A)
 Contruction of LQUP factorization of A (making a copy of A)
 
template<class _Rep >
 LQUPMatrix (BlasMatrix< Field, _Rep > &A)
 Contruction of LQUP factorization of A (in-place in A)
 
template<class _Rep >
 LQUPMatrix (const BlasMatrix< Field, _Rep > &A, BlasPermutation< size_t > &P, BlasPermutation< size_t > &Q)
 Contruction of LQUP factorization of A (making a copy of A). More...
 
template<class _Rep >
 LQUPMatrix (BlasMatrix< Field, _Rep > &A, BlasPermutation< size_t > &P, BlasPermutation< size_t > &Q)
 Contruction of LQUP factorization of A (in-place in A). More...
 
 ~LQUPMatrix ()
 destructor.
 
Field & field ()
 get the field on which the factorization is done
 
size_t rowdim () const
 get row dimension
 
size_t coldim () const
 get column dimension
 
size_t getRank () const
 get the rank of matrix
 
const BlasPermutation< size_t > & getP () const
 get the permutation P. More...
 
BlasPermutation< size_t > & getP (BlasPermutation< size_t > &P) const
 get the permutation P. More...
 
const BlasPermutation< size_t > & getQ () const
 Get the transpose of the permutation Q. More...
 
BlasPermutation< size_t > & getQ (BlasPermutation< size_t > &Qt) const
 get the permutation Qt. More...
 
template<class _Rep >
TriangularBlasMatrix< Field,
_Rep > & 
getL (TriangularBlasMatrix< Field, _Rep > &L, bool _QLUP=false) const
 get the Matrix L. More...
 
template<class _Rep >
TriangularBlasMatrix< Field,
_Rep > & 
getU (TriangularBlasMatrix< Field, _Rep > &U) const
 get the matrix U. More...
 
template<class _Rep >
BlasMatrix< Field, _Rep > & getS (BlasMatrix< Field, _Rep > &S) const
 get the matrix S. More...
 
template<class Operand >
Operand & left_solve (Operand &X, const Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & left_solve (Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & right_solve (Operand &X, const Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & right_solve (Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & left_Lsolve (Operand &X, const Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & left_Lsolve (Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & right_Lsolve (Operand &X, const Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & right_Lsolve (Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & left_Usolve (Operand &X, const Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & rleft_Usolve (Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & right_Usolve (Operand &X, const Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 
template<class Operand >
Operand & right_Usolve (Operand &B) const
 Solvers with matrices or vectors Operand can be a BlasMatrix<Field,_Rep> or a std::vector<Element>
 

Detailed Description

template<class Field>
class LinBox::LQUPMatrix< Field >

LQUP factorisation.

This is a class to ease the use LU factorisation (see FFPACK::LUdivine (bug link here.))

The factorisation is $ A = L Q U P $ with L lower unit triangular, U upper non-unit triangular, P and Q permutations.

There are two kind of contructors (with and without permutations) and they build a LQUP factorisation of a BlasMatrix/BlasBlackbox on a finite field. There are methods for retrieving L,Q,U and P matrices and methods for solving systems.

Bug:
Should really be tempalted by Matrix and be a (sub)domain

Constructor & Destructor Documentation

LQUPMatrix ( const BlasMatrix< Field, _Rep > &  A,
BlasPermutation< size_t > &  P,
BlasPermutation< size_t > &  Q 
)

Contruction of LQUP factorization of A (making a copy of A).

P and Q are arguments !

LQUPMatrix ( BlasMatrix< Field, _Rep > &  A,
BlasPermutation< size_t > &  P,
BlasPermutation< size_t > &  Q 
)

Contruction of LQUP factorization of A (in-place in A).

P and Q are arguments !

Bug:
in place ?

Member Function Documentation

const BlasPermutation< size_t > & getP ( ) const

get the permutation P.

(no copy)

BlasPermutation< size_t > & getP ( BlasPermutation< size_t > &  P) const

get the permutation P.

(copy)

const BlasPermutation< size_t > & getQ ( ) const

Get the transpose of the permutation Q.

Warning
This does not return Q itself! (because it is more difficult to compute) If needed, Q can be obtained as a TransposedBlasMatrix from the return value. One reason this confusion exists is that left-multiplying by a permuation matrix corresponds to a row permuation $\pi \in S_n$, while right-multiplying by the same matrix corresponds to the inverse column permutation $\pi^{-1}$! Usually this is handled intelligently (eg by applyP) but you must be careful with getQ().
BlasPermutation< size_t > & getQ ( BlasPermutation< size_t > &  Qt) const

get the permutation Qt.

(copy)

Warning
see LQUPMatrix::getQ()
TriangularBlasMatrix< Field, _Rep > & getL ( TriangularBlasMatrix< Field, _Rep > &  L,
bool  _QLUP = false 
) const
inline

get the Matrix L.

Parameters
[out]L
_QLUPif true then L form QLUP decomposition, else L is form LQUP decomposition.
Precondition
L has unit diagonal
TriangularBlasMatrix< Field, _Rep > & getU ( TriangularBlasMatrix< Field, _Rep > &  U) const
inline

get the matrix U.

Precondition
U has non-unit diagonal
BlasMatrix< Field, _Rep > & getS ( BlasMatrix< Field, _Rep > &  S) const
inline

get the matrix S.

from the LSP factorization of A deduced from LQUP)


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