linbox
Public Member Functions
ScalarMatrix< Field > Class Template Reference

Blackbox for aI. More...

#include <scalar-matrix.h>

Inherits BlackboxInterface.

Public Member Functions

 ScalarMatrix ()
 Constructs an initially 0 by 0 matrix. More...
 
 ScalarMatrix (const Field &F)
 Constructor of readable scalar matrix. More...
 
 ScalarMatrix (const Field &F, const size_t n, const typename Field::RandIter &iter)
 Constructor from a random element. More...
 
template<class OutVector , class InVector >
OutVector & apply (OutVector &y, InVector &x) const
 Application of BlackBox matrix. More...
 
template<class OutVector , class InVector >
OutVector & applyTranspose (OutVector &y, InVector &x) const
 Application of BlackBox matrix transpose. More...
 

Detailed Description

template<typename Field>
class LinBox::ScalarMatrix< Field >

Blackbox for aI.

Use particularly for representing 0 and I.

This is a class of blackbox square scalar matrices. Each scalar matrix occupies O(scalar-size) memory. The matrix itself is not stored in memory, just the scalar and the dimensions.

Constructor & Destructor Documentation

ScalarMatrix ( )
inline

Constructs an initially 0 by 0 matrix.

Bug:
this should not be allowed (unknown field)
ScalarMatrix ( const Field &  F)
inline

Constructor of readable scalar matrix.

Parameters
Ffield in which to do arithmetic.
ScalarMatrix ( const Field &  F,
const size_t  n,
const typename Field::RandIter &  iter 
)
inline

Constructor from a random element.

Parameters
Ffield in which to do arithmetic.
nsize of the matrix.
iterRandom iterator from which to get the diagonal scalar element.

Member Function Documentation

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

Application of BlackBox matrix.

y= A*x. Requires time linear in n, the size of the matrix.

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

Application of BlackBox matrix transpose.

y= transpose(A)*x. Requires time linear in n, the size of the matrix.


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