Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

ScalarMatrix Class Template Reference
[linbox/blackbox]

#include <scalar-matrix.h>

Inheritance diagram for ScalarMatrix:

BlackboxInterface

Detailed Description

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


Public Types

typedef _Field Field
typedef Field::Element Element
typedef ScalarMatrix< _Field > Self_t

Public Member Functions

 ScalarMatrix ()
 Constructs an initially 0 by 0 matrix.

 ScalarMatrix (const Field &F, const size_t n, const Element &s)
 ScalarMatrix (const Field &F, const size_t n, const typename Field::RandIter &iter)
 ScalarMatrix (const ScalarMatrix< Field > &M)
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
const Fieldfield () const
Elementtrace (Element &t) const
ElementgetEntry (Element &x, const size_t i, const size_t j) const

Protected Member Functions

template<class OutVector, class InVector> OutVector & _app (OutVector &y, const InVector &x, VectorCategories::DenseVectorTag) const
template<class OutVector, class InVector> OutVector & _app (OutVector &y, const InVector &x, VectorCategories::SparseSequenceVectorTag) const
template<class OutVector, class InVector> OutVector & _app (OutVector &y, const InVector &x, VectorCategories::SparseAssociativeVectorTag) const

Protected Attributes

Field _F
size_t _n
Element _v


Member Typedef Documentation

typedef _Field Field
 

typedef Field::Element Element
 

typedef ScalarMatrix<_Field> Self_t
 


Constructor & Destructor Documentation

ScalarMatrix  )  [inline]
 

Constructs an initially 0 by 0 matrix.

ScalarMatrix const Field F,
const size_t  n,
const Element s
[inline]
 

Scalar matrix Constructor from an element.

Parameters:
F field in which to do arithmetic.
n size of the matrix.
s scalar, a field element, to be used as the diagonal of the matrix.

ScalarMatrix const Field F,
const size_t  n,
const typename Field::RandIter iter
[inline]
 

Constructor from a random element.

Parameters:
F field in which to do arithmetic.
n size of the matrix.
iter Random iterator from which to get the diagonal scalar element.

ScalarMatrix const ScalarMatrix< Field > &  M  )  [inline]
 


Member Function Documentation

OutVector& apply OutVector &  y,
const 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,
const InVector &  x
const [inline]
 

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

size_t rowdim void   )  const [inline]
 

size_t coldim void   )  const [inline]
 

const Field& field  )  const [inline]
 

Element& trace Element t  )  const [inline]
 

Element& getEntry Element x,
const size_t  i,
const size_t  j
const [inline]
 

OutVector & _app OutVector &  y,
const InVector &  x,
VectorCategories::DenseVectorTag 
const [inline, protected]
 

OutVector & _app OutVector &  y,
const InVector &  x,
VectorCategories::SparseSequenceVectorTag 
const [inline, protected]
 

OutVector & _app OutVector &  y,
const InVector &  x,
VectorCategories::SparseAssociativeVectorTag 
const [inline, protected]
 


Field Documentation

Field _F [protected]
 

size_t _n [protected]
 

Element _v [protected]
 


Generated on Fri Jul 8 10:29:49 2005 for linbox by doxygen 1.3.7