Blackbox of a product: , i.e .
More...
#include <compose.h>
Inherits BlackboxInterface.
Compose (const Blackbox1 &A, const Blackbox2 &B)
Constructor of C := A*B from blackbox matrices A and B.
Compose (const Blackbox1 *A_ptr, const Blackbox2 *B_ptr)
Constructor of C := (A_ptr) (*B_ptr).
Compose (const Compose < Blackbox1, Blackbox2 > &Mat )
Copy constructor.
~Compose ()
Destructor.
template<class OutVector , class InVector >
OutVector & apply (OutVector &y, const InVector &x) const
Matrix * column vector product.
template<class OutVector , class InVector >
OutVector & applyTranspose (OutVector &y, const InVector &x) const
row vector * matrix product.
size_t rowdim (void) const
The number of rows.
size_t coldim (void) const
The number of columns.
const Field & field () const
The field.
const Blackbox1 * getLeftPtr () const
accessor to the blackboxes
const Blackbox2 * getRightPtr () const
accessor to the blackboxes
template<class _Blackbox1, class _Blackbox2>
class LinBox::Compose< _Blackbox1, _Blackbox2 >
Blackbox of a product: , i.e .
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 BlackboxArchetype .
Template parameter: must meet the vector requirement. General case
Examples examples/minpoly.C , examples/omp_block_rank.C , examples/smithsparse.C , and examples/valence.C .
◆ Compose() [1/3]
template<class _Blackbox1 , class _Blackbox2 >
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.
Precondition A.coldim() == B.rowdim()
.
Parameters
◆ Compose() [2/3]
template<class _Blackbox1 , class _Blackbox2 >
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.
Parameters
A_ptr blackbox
B_ptr blackbox
◆ Compose() [3/3]
template<class _Blackbox1 , class _Blackbox2 >
Copy constructor.
Copies the composed matrix (a small handle). The underlying two matrices are not copied.
Parameters
◆ apply()
template<class _Blackbox1 , class _Blackbox2 >
template<class OutVector , class InVector >
OutVector & apply
(
OutVector &
y ,
const InVector &
x
)
const
inline
Matrix * column vector product.
Applies B, then A.
Returns reference to vector y containing output.
Parameters
x constant reference to vector to contain input
[out] y the result.
◆ applyTranspose()
template<class _Blackbox1 , class _Blackbox2 >
template<class OutVector , class InVector >
OutVector & applyTranspose
(
OutVector &
y ,
const InVector &
x
)
const
inline
row vector * matrix product.
. Applies A^t then B^t.
Returns reference to vector y containing output.
Parameters
x constant reference to vector to contain input
[out] y the result.
The documentation for this class was generated from the following file: