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

Compose Class Template Reference
[linbox/blackbox]

#include <compose.h>

Inheritance diagram for Compose:

BlackboxInterface List of all members.

Detailed Description

template<class _Blackbox1, class _Blackbox2 = _Blackbox1>
class LinBox::Compose< _Blackbox1, _Blackbox2 >

General case.

This is a class that multiplies two matrices by implementing an apply method that calls the apply methods of both of the consituent matrices, one after the other.

This class, like the Black Box archetype from which it is derived, is templatized by the vector type to which the matrix is applied. Both constituent matrices must also use this same vector type. For specification of the blackbox members see \Ref{BlackboxArchetype}.

{\bf Template parameter:} must meet the \Ref{Vector} requirement.


Public Types

typedef _Blackbox1 Blackbox1
typedef _Blackbox2 Blackbox2
typedef Blackbox2::Field Field
typedef Field::Element Element

Public Methods

 Compose (const Blackbox1 &A, const Blackbox2 &B)
 Compose (const Blackbox1 *A_ptr, const Blackbox2 *B_ptr)
 Compose (const Compose< Blackbox1, Blackbox2 > &M)
 ~Compose ()
 Destructor.

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
 The number of rows.

size_t coldim (void) const
 The number of columns.

const Fieldfield () const
 The field.

const Blackbox1getLeftPtr () const
const Blackbox2getRightPtr () const

Protected Attributes

const Blackbox1_A_ptr
const Blackbox2_B_ptr
std::vector< Element_z


Member Typedef Documentation

typedef _Blackbox1 Blackbox1
 

typedef _Blackbox2 Blackbox2
 

typedef Field::Element Element
 

typedef Blackbox2::Field Field
 


Constructor & Destructor Documentation

Compose const Blackbox1   A,
const Blackbox2   B
[inline]
 

Constructor of C := A*B from blackbox matrices A and B. Build the product A*B of any two black box matrices of compatible dimensions. Requires A.coldim() equals B.rowdim().

Compose const Blackbox1   A_ptr,
const Blackbox2   B_ptr
[inline]
 

Constructor of C := (*A_ptr)*(*B_ptr). This constructor creates a matrix that is a product of two black box matrices: A*B from pointers to them.

Compose const Compose< Blackbox1, Blackbox2 > &    M [inline]
 

Copy constructor. Copies the composed matrix (a small handle). The underlying two matrices are not copied.

~Compose   [inline]
 

Destructor.


Member Function Documentation

OutVector& apply OutVector &    y,
const InVector &    x
const [inline]
 

Matrix * column vector product. y= (A*B)*x. Applies B, then A.

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

OutVector& applyTranspose OutVector &    y,
const InVector &    x
const [inline]
 

row vector * matrix produc y= transpose(A*B)*x. Applies A^t then B^t.

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

size_t coldim void    const [inline]
 

The number of columns.

const Field& field   const [inline]
 

The field.

const Blackbox1* getLeftPtr   const [inline]
 

const Blackbox2* getRightPtr   const [inline]
 

size_t rowdim void    const [inline]
 

The number of rows.


Member Data Documentation

const Blackbox1* _A_ptr [protected]
 

const Blackbox2* _B_ptr [protected]
 

std::vector<Element> _z [protected]
 


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