linbox
Public Member Functions
MoorePenrose< Blackbox > Class Template Reference

Generalized inverse of a blackbox. More...

#include <moore-penrose.h>

Inherits BlackboxInterface.

Public Member Functions

 MoorePenrose (const Blackbox *A, size_t rank)
 Constructor from field and dense vector of field elements. More...
 
 MoorePenrose (const MoorePenrose &A)
 Copy constructor. More...
 
 ~MoorePenrose ()
 Destructor.
 
template<class OutVector , class InVector >
OutVector & apply (OutVector &y, const InVector &x) const
 Application of BlackBox matrix. More...
 
template<class OutVector , class InVector >
OutVector & applyTranspose (OutVector &y, const InVector &x) const
 Application of BlackBox matrix transpose. More...
 
size_t rowdim (void) const
 Retreive _row dimensions of BlackBox matrix. More...
 
size_t coldim (void) const
 Retreive _column dimensions of BlackBox matrix. More...
 

Detailed Description

template<class Blackbox>
class LinBox::MoorePenrose< Blackbox >

Generalized inverse of a blackbox.

Efficiency concerns when many applications are used.

Given an arbitrary matrix in black box representation, this black box represents the Moore-Penrose inverse of the matrix.

This implementation assumes that A already has a nonsingular principal r x r minor. It is the caller's responsibility to ensure that that condition holds.

Given MoorePenrose M(A, r), and vector b, we have that M.apply(u, b) provides the least norm, least squares solution x = u to Ax = b.

TODO: remove the requirement that lpm is nonsingular. Specialize for dense matrices.

Constructor & Destructor Documentation

MoorePenrose ( const Blackbox *  A,
size_t  rank 
)
inline

Constructor from field and dense vector of field elements.

-param BB Black box from which to extract the submatrix -param row First row of the submatrix to extract (1.._BB->rowdim ()) -param col First column of the submatrix to extract (1.._BB->coldim ()) -param rowdim Row dimension -param coldim Column dimension

Parameters
A
rank
MoorePenrose ( const MoorePenrose< Blackbox > &  A)
inline

Copy constructor.

Bug:
Value of pointer '_matB1', which points to allocated memory, is copied in copy constructor instead of allocating new memory.

Member Function Documentation

OutVector& apply ( OutVector &  y,
const InVector &  x 
) const
inline

Application of BlackBox matrix.

y= A*x. Requires one vector conforming to the LinBox vector archetype. Required by abstract base class.

Returns
reference to vector y containing output.
Parameters
xconstant reference to vector to contain input
y
OutVector& applyTranspose ( OutVector &  y,
const InVector &  x 
) const
inline

Application of BlackBox matrix transpose.

y= transpose(A)*x. Requires one vector conforming to the LinBox vector archetype. Required by abstract base class.

Returns
reference to vector y containing output.
Parameters
xconstant reference to vector to contain input
y
size_t rowdim ( void  ) const
inline

Retreive _row dimensions of BlackBox matrix.

This may be needed for applying preconditioners. Required by abstract base class.

Returns
integer number of _rows of black box matrix.
size_t coldim ( void  ) const
inline

Retreive _column dimensions of BlackBox matrix.

Required by abstract base class.

Returns
integer number of _columns of black box matrix.

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