linbox
Dif< _Blackbox1, _Blackbox2 > Class Template Reference

Blackbox of a difference: C := A - B, i.e Cx = Ax - Bx. More...

#include <dif.h>

+ Inheritance diagram for Dif< _Blackbox1, _Blackbox2 >:

Data Structures

struct  rebind
 

Public Types

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

Public Member Functions

 Dif (const Blackbox1 &A, const Blackbox2 &B)
 Build this as A - B from blackboxes A, B.
 
 Dif (const Blackbox1 *A_ptr, const Blackbox2 *B_ptr)
 Build this as A - B from blackbox pointers A_ptr, B_ptr.
 
 Dif (const Dif< Blackbox1, Blackbox2 > &M)
 Makes a deep copy.
 
 ~Dif (void)
 Destructor.
 
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
 

Detailed Description

template<class _Blackbox1, class _Blackbox2>
class LinBox::Dif< _Blackbox1, _Blackbox2 >

Blackbox of a difference: C := A - B, i.e Cx = Ax - Bx.

Template parameters: Field is the class of the entry domain, Vector is a LinBox dense or sparse vector of field elements class.

Member Typedef Documentation

◆ Blackbox1

template<class _Blackbox1, class _Blackbox2>
typedef _Blackbox1 Blackbox1

◆ Blackbox2

template<class _Blackbox1, class _Blackbox2>
typedef _Blackbox2 Blackbox2

◆ Field

template<class _Blackbox1, class _Blackbox2>
typedef Blackbox1::Field Field

◆ Element

template<class _Blackbox1, class _Blackbox2>
typedef Blackbox1::Element Element

Constructor & Destructor Documentation

◆ Dif() [1/3]

template<class _Blackbox1, class _Blackbox2>
Dif ( const Blackbox1 & A,
const Blackbox2 & B )
inline

Build this as A - B from blackboxes A, B.

A and B must have the same shape and be over the same field. Their data is not copied. A subsequent change to one of them also changes this difference.

◆ Dif() [2/3]

template<class _Blackbox1, class _Blackbox2>
Dif ( const Blackbox1 * A_ptr,
const Blackbox2 * B_ptr )
inline

Build this as A - B from blackbox pointers A_ptr, B_ptr.

The two matrices must have the same shape and be over the same field. Their data is copied. I don't know why.

◆ Dif() [3/3]

template<class _Blackbox1, class _Blackbox2>
Dif ( const Dif< Blackbox1, Blackbox2 > & M)
inline

Makes a deep copy.

Creates new black box objects in dynamic memory.

Parameters
Mconstant reference to compose black box matrix

◆ ~Dif()

template<class _Blackbox1, class _Blackbox2>
~Dif ( void )
inline

Destructor.

Member Function Documentation

◆ apply()

template<class _Blackbox1, class _Blackbox2>
template<class OutVector, class InVector>
OutVector & apply ( OutVector & y,
const InVector & x ) const
inline

Application of BlackBox matrix.

y= (A+B)*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

◆ applyTranspose()

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

Application of BlackBox matrix transpose.

y= transpose(A+B)*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 _Blackbox1, class _Blackbox2>
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 _Blackbox1, class _Blackbox2>
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 _Blackbox1, class _Blackbox2>
const Field & field ( ) const
inline

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