linbox
Inverse< Blackbox > Class Template Reference

A Blackbox for the inverse. More...

#include <inverse.h>

+ Inheritance diagram for Inverse< Blackbox >:

Data Structures

struct  rebind
 

Public Types

typedef Blackbox::Field Field
 
typedef Field::Element Element
 
typedef BlasVector< FieldPolynomial
 

Public Member Functions

 Inverse (const Blackbox *BB)
 Constructor from field and dense vector of field elements.
 
 Inverse (const Inverse &BB)
 Copy constructor, so that we don't have to recompute the minimal polynomial every time this black box is used inside another black box.
 
template<class OutVector, class InVector>
OutVector & apply (OutVector &y, const InVector &x) const
 Application of BlackBox matrix.
 
template<class OutVector, class InVector>
OutVector & applyTranspose (OutVector &y, const InVector &x) const
 Application of BlackBox matrix transpose.
 
size_t rowdim (void) const
 Retreive row dimensions of BlackBox matrix.
 
size_t coldim (void) const
 Retreive column dimensions of BlackBox matrix.
 
const Fieldfield () const
 

Protected Attributes

const VectorDomain< Field_VD
 
const Blackbox_BB
 
Polynomial _minpoly
 
Polynomial _transposeMinpoly
 
Polynomial _z
 

Detailed Description

template<class Blackbox>
class LinBox::Inverse< Blackbox >

A Blackbox for the inverse.

Not efficient if many applications are used.

The matrix itself is not stored in memory. Rather, its apply methods use a vector of field elements, which are used to "multiply" the matrix to a vector.

This class has three template parameters. The first is the field in which the arithmetic is to be done. The second is the type of LinBox vector to which to apply the matrix. The third is chosen be default to be the LinBox vector trait of the vector. This class is then specialized for dense and sparse vectors.

Parameters
FieldLinBox field
VectorLinBox dense or sparse vector of field elements
TraitMarker whether to use dense or sparse LinBox vector implementation. This is chosen by a default parameter and partial template specialization.

Member Typedef Documentation

◆ Field

template<class Blackbox>
typedef Blackbox::Field Field

◆ Element

template<class Blackbox>
typedef Field::Element Element

◆ Polynomial

template<class Blackbox>
typedef BlasVector<Field> Polynomial

Constructor & Destructor Documentation

◆ Inverse() [1/2]

template<class Blackbox>
Inverse ( const Blackbox * BB)
inline

Constructor from field and dense vector of field elements.

Parameters
BBBlack box of which to get the inverse

◆ Inverse() [2/2]

template<class Blackbox>
Inverse ( const Inverse< Blackbox > & BB)
inline

Copy constructor, so that we don't have to recompute the minimal polynomial every time this black box is used inside another black box.

Member Function Documentation

◆ apply()

template<class Blackbox>
template<class OutVector, class InVector>
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
yreference to vector into which to store the result
xconstant reference to vector to contain input

◆ applyTranspose()

template<class Blackbox>
template<class OutVector, class InVector>
OutVector & applyTranspose ( OutVector & y,
const InVector & x ) const
inline

Application of BlackBox matrix transpose.

\( y= A^t \cdot 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

◆ rowdim()

template<class Blackbox>
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.

◆ coldim()

template<class Blackbox>
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.

◆ field()

template<class Blackbox>
const Field & field ( ) const
inline

Field Documentation

◆ _VD

template<class Blackbox>
const VectorDomain<Field> _VD
protected

◆ _BB

template<class Blackbox>
const Blackbox* _BB
protected

◆ _minpoly

template<class Blackbox>
Polynomial _minpoly
mutableprotected

◆ _transposeMinpoly

template<class Blackbox>
Polynomial _transposeMinpoly
mutableprotected

◆ _z

template<class Blackbox>
Polynomial _z
mutableprotected

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