Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Hilbert Class Template Reference
[linbox/blackbox]

#include <hilbert.h>

Inheritance diagram for Hilbert:

BlackboxInterface List of all members.

Detailed Description

template<class _Field, class Trait = typename VectorTraits<typename Vector<_Field>::Dense>::VectorCategory>
class LinBox::Hilbert< _Field, Trait >

Example of a blackbox that is space efficient, though not time efficient.

This is a class of n by n Hilbert matrices templatized by the field in which the elements reside. The class conforms to the archetype for \Ref{BlackBox Matrices}.

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 \Ref{LinBox} vector to which to apply the matrix. The third is chosen be defualt to be the \Ref{LinBox} vector trait of the vector. This class is then specialized for dense and sparse vectors.

The default class is not implemented. It's functions should never be called because partial template specialization should always be done on the vector traits.

Parameters:
Field  \Ref{LinBox} field
Vector  \Ref{LinBox} dense or sparse vector of field elements
Trait  Marker whether to use dense or sparse LinBox vector implementation. This is chosen by a default parameter and partial template specialization.


Public Types

typedef _Field Field
typedef Field::Element Element

Public Methods

 Hilbert (Field F, size_t n)
template<class OutVector, class InVector> OutVector & apply (OutVector &y, const InVector &x) const
template<class OutVector, class InVector> OutVector & applyTranspose (OutVector &y, const InVector &x) const
size_t rowdim (void) const
size_t coldim (void) const


Member Typedef Documentation

typedef Field::Element Element
 

typedef _Field Field
 


Constructor & Destructor Documentation

Hilbert Field    F,
size_t    n
 

Constructor from integer and field.

Parameters:
n  size_t integer number of rows and columns of matrix.


Member Function Documentation

OutVector& apply OutVector &    y,
const InVector &    x
const
 

Application of BlackBox matrix. y= A*x. Requires one vector conforming to the \Ref{LinBox} vector archetype. Required by abstract base class.

Returns:
reference to vector y containing output.
Parameters:
x  constant reference to vector to contain input

OutVector& applyTranspose OutVector &    y,
const InVector &    x
const
 

Application of BlackBox matrix transpose. y= transpose (A)*x. Requires one vector conforming to the \Ref{LinBox} vector archetype. Required by abstract base class. Because the Hilbert matrix is symmetric, this is the same as calling the apply function.

Returns:
reference to vector y containing output.
Parameters:
x  constant reference to vector to contain input

size_t coldim void    const
 

Retreive column dimensions of BlackBox matrix. Required by abstract base class.

Returns:
integer number of columns of black box matrix.

size_t rowdim void    const
 

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.


Generated on Mon Jun 20 09:16:56 2005 for linbox by doxygen1.2.18