linbox
BlasMatrixDomain< Field_ > Class Template Reference

Interface for all functionnalities provided for BlasMatrix. More...

#include <blas-matrix-domain.h>

Public Member Functions

 BlasMatrixDomain ()
 Constructor of BlasDomain.
 
 BlasMatrixDomain (const BlasMatrixDomain< Field > &BMD)
 Copy constructor.
 
const Field & field () const
 Field accessor.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & mul (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 multiplication.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & add (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 addition.
 
template<class Operand1, class Operand2>
Operand1 & copy (Operand1 &B, const Operand2 &A) const
 copy.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & sub (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 substraction C = A-B
 
template<class Operand1, class Operand3>
Operand1 & subin (Operand1 &C, const Operand3 &B) const
 substraction (in place) C -= B
 
template<class Operand1, class Operand2>
Operand1 & addin (Operand1 &C, const Operand2 &B) const
 addition (in place) C += B
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & mul (Operand1 &C, const Element &alpha, const Operand2 &A, const Operand3 &B) const
 multiplication with scaling.
 
template<class Operand1, class Operand2>
Operand1 & mulin_left (Operand1 &A, const Operand2 &B) const
 In place multiplication.
 
template<class Operand1, class Operand2>
Operand2 & mulin_right (const Operand1 &A, Operand2 &B) const
 In place multiplication.
 
template<class Operand1, class Operand2, class Operand3, class Operand4>
Operand1 & axpy (Operand1 &D, const Operand2 &A, const Operand3 &B, const Operand4 &C) const
 axpy.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & axpyin (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 axpyin.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & maxpy (Operand1 &D, const Operand2 &A, const Operand3 &B, const Operand1 &C) const
 maxpy.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & maxpyin (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 maxpyin.
 
template<class Operand1, class Operand2, class Operand3, class Operand4>
Operand1 & axmy (Operand1 &D, const Operand2 &A, const Operand3 &B, const Operand4 &C) const
 axmy.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & axmyin (Operand1 &C, const Operand2 &A, const Operand3 &B) const
 axmyin.
 
template<class Operand1, class Operand2, class Operand3, class Operand4>
Operand1 & muladd (Operand1 &D, const Element &beta, const Operand2 &C, const Element &alpha, const Operand3 &A, const Operand4 &B) const
 general matrix-matrix multiplication and addition with scaling.
 
template<class Operand1, class Operand2, class Operand3>
Operand1 & muladdin (const Element &beta, Operand1 &C, const Element &alpha, const Operand2 &A, const Operand3 &B) const
 muladdin.
 
Solutions available for matrix respecting BlasMatrix interface
template<class Matrix1, class Matrix2>
Matrix1 & inv (Matrix1 &Ainv, const Matrix2 &A) const
 Inversion.
 
template<class Matrix>
Matrix & invin (Matrix &Ainv, Matrix &A) const
 Inversion (in place)
 
template<class Matrix>
Matrix & invin (Matrix &A) const
 Inversion (the matrix A is modified)
 
template<class Matrix>
Matrix & div (Matrix &C, const Matrix &A, const Matrix &B) const
 Division.
 
Matrix & swap (Matrix &B, Matrix &A) const
 Matrix swap B <--> A.
 
template<class Matrix1, class Matrix2>
Matrix1 & inv (Matrix1 &Ainv, const Matrix2 &A, int &nullity) const
 Inversion w singular check.
 
template<class Matrix1, class Matrix2>
Matrix1 & invin (Matrix1 &Ainv, Matrix2 &A, int &nullity) const
 Inversion (the matrix A is modified) w singular check.
 
template<class Matrix>
unsigned int rank (const Matrix &A) const
 Rank.
 
template<class Matrix>
unsigned int rankInPlace (Matrix &A) const
 in-place Rank (the matrix is modified)
 
template<class Matrix>
Element det (const Matrix &A) const
 determinant
 
template<class Matrix>
Element detInPlace (Matrix &A) const
 in-place Determinant (the matrix is modified)
 
Solvers for Matrix (respecting BlasMatrix interface)

with Operand as right or left hand side

template<class Operand1, class Matrix, class Operand2>
Operand1 & left_solve (Operand1 &X, const Matrix &A, const Operand2 &B) const
 linear solve with matrix right hand side.
 
template<class Operand, class Matrix>
Operand & left_solve (const Matrix &A, Operand &B) const
 linear solve with matrix right hand side, the result is stored in-place in B.
 
template<class Operand1, class Matrix, class Operand2>
Operand1 & right_solve (Operand1 &X, const Matrix &A, const Operand2 &B) const
 linear solve with matrix right hand side.
 
template<class Operand, class Matrix>
Operand & right_solve (const Matrix &A, Operand &B) const
 linear solve with matrix right hand side, the result is stored in-place in B.
 
template<class Polynomial, class Matrix>
Polynomial & minpoly (Polynomial &P, const Matrix &A) const
 minimal polynomial computation.
 
template<class Polynomial, class Matrix>
Polynomial & charpoly (Polynomial &P, Matrix &A) const
 characteristic polynomial computation.
 
template<class Polynomial>
Polynomial & mulpoly (Polynomial &res, const Polynomial &P1, const Polynomial &P2) const
 
template<class Matrix1, class Matrix2>
bool areEqual (const Matrix1 &A, const Matrix2 &B) const
 
template<class Matrix>
void setIdentity (Matrix &I) const
 linear solve with matrix right hand side.
 
template<class Matrix>
void setZero (Matrix &I) const
 
template<class Matrix1>
bool isZero (const Matrix1 &A) const
 
template<class Matrix1>
bool isIdentity (const Matrix1 &A) const
 
template<class Matrix1>
bool isIdentityGeneralized (const Matrix1 &A) const
 
template<class myBlasMatrix>
Element & Magnitude (Element &r, const myBlasMatrix &A) const
 linear solve with matrix right hand side.
 
template<class Matrix>
std::ostream & write (std::ostream &os, const Matrix &A) const
 Print matrix.
 
template<class Matrix>
std::ostream & write (std::ostream &os, const Matrix &A, bool maple_format) const
 linear solve with matrix right hand side.
 
template<class Matrix>
std::istream & read (std::istream &is, Matrix &A) const
 Read matrix.
 

Detailed Description

template<class Field_>
class LinBox::BlasMatrixDomain< Field_ >

Interface for all functionnalities provided for BlasMatrix.

Examples
examples/checksolve.C.

Member Function Documentation

◆ mul() [1/2]

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & mul ( Operand1 & C,
const Operand2 & A,
const Operand3 & B ) const
inline

multiplication.

C = A*B

Examples
examples/checksolve.C.

◆ add()

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & add ( Operand1 & C,
const Operand2 & A,
const Operand3 & B ) const
inline

addition.

C = A+B

◆ copy()

template<class Field_>
template<class Operand1, class Operand2>
Operand1 & copy ( Operand1 & B,
const Operand2 & A ) const
inline

copy.

B = A

◆ mul() [2/2]

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & mul ( Operand1 & C,
const Element & alpha,
const Operand2 & A,
const Operand3 & B ) const
inline

multiplication with scaling.

C = alpha.A*B

◆ mulin_left()

template<class Field_>
template<class Operand1, class Operand2>
Operand1 & mulin_left ( Operand1 & A,
const Operand2 & B ) const
inline

In place multiplication.

A = A*B

◆ mulin_right()

template<class Field_>
template<class Operand1, class Operand2>
Operand2 & mulin_right ( const Operand1 & A,
Operand2 & B ) const
inline

In place multiplication.

B = A*B

◆ axpy()

template<class Field_>
template<class Operand1, class Operand2, class Operand3, class Operand4>
Operand1 & axpy ( Operand1 & D,
const Operand2 & A,
const Operand3 & B,
const Operand4 & C ) const
inline

axpy.

D = A*B + C

◆ axpyin()

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & axpyin ( Operand1 & C,
const Operand2 & A,
const Operand3 & B ) const
inline

axpyin.

C += A*B

◆ maxpy()

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & maxpy ( Operand1 & D,
const Operand2 & A,
const Operand3 & B,
const Operand1 & C ) const
inline

maxpy.

D = C - A*B

◆ maxpyin()

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & maxpyin ( Operand1 & C,
const Operand2 & A,
const Operand3 & B ) const
inline

maxpyin.

C -= A*B

◆ axmy()

template<class Field_>
template<class Operand1, class Operand2, class Operand3, class Operand4>
Operand1 & axmy ( Operand1 & D,
const Operand2 & A,
const Operand3 & B,
const Operand4 & C ) const
inline

axmy.

D= A*B - C

◆ axmyin()

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & axmyin ( Operand1 & C,
const Operand2 & A,
const Operand3 & B ) const
inline

axmyin.

C = A*B - C

◆ muladd()

template<class Field_>
template<class Operand1, class Operand2, class Operand3, class Operand4>
Operand1 & muladd ( Operand1 & D,
const Element & beta,
const Operand2 & C,
const Element & alpha,
const Operand3 & A,
const Operand4 & B ) const
inline

general matrix-matrix multiplication and addition with scaling.

D= beta.C + alpha.A*B

◆ muladdin()

template<class Field_>
template<class Operand1, class Operand2, class Operand3>
Operand1 & muladdin ( const Element & beta,
Operand1 & C,
const Element & alpha,
const Operand2 & A,
const Operand3 & B ) const
inline

muladdin.

C= beta.C + alpha.A*B.

◆ div()

template<class Field_>
template<class Matrix>
Matrix & div ( Matrix & C,
const Matrix & A,
const Matrix & B ) const
inline

Division.

C = A B^{-1} ==> C . B = A

◆ swap()

template<class Field_>
Matrix & swap ( Matrix & B,
Matrix & A ) const
inline

Matrix swap B <--> A.

They must already have the same shape.

Returns
Reference to B

◆ left_solve() [1/2]

template<class Field_>
template<class Operand1, class Matrix, class Operand2>
Operand1 & left_solve ( Operand1 & X,
const Matrix & A,
const Operand2 & B ) const
inline

linear solve with matrix right hand side.

AX=B

◆ left_solve() [2/2]

template<class Field_>
template<class Operand, class Matrix>
Operand & left_solve ( const Matrix & A,
Operand & B ) const
inline

linear solve with matrix right hand side, the result is stored in-place in B.

Precondition
A must be square AX=B , (B<-X)

◆ right_solve() [1/2]

template<class Field_>
template<class Operand1, class Matrix, class Operand2>
Operand1 & right_solve ( Operand1 & X,
const Matrix & A,
const Operand2 & B ) const
inline

linear solve with matrix right hand side.

XA=B

◆ right_solve() [2/2]

template<class Field_>
template<class Operand, class Matrix>
Operand & right_solve ( const Matrix & A,
Operand & B ) const
inline

linear solve with matrix right hand side, the result is stored in-place in B.

Precondition
A must be square XA=B , (B<-X)

◆ mulpoly()

template<class Field_>
template<class Polynomial>
Polynomial & mulpoly ( Polynomial & res,
const Polynomial & P1,
const Polynomial & P2 ) const
inline
Todo
Temporary: waiting for an implementation of a domain of polynomial

◆ areEqual()

template<class Field_>
template<class Matrix1, class Matrix2>
bool areEqual ( const Matrix1 & A,
const Matrix2 & B ) const
inline
Bug
use refs

◆ setIdentity()

template<class Field_>
template<class Matrix>
void setIdentity ( Matrix & I) const
inline

linear solve with matrix right hand side.

AX=B

◆ setZero()

template<class Field_>
template<class Matrix>
void setZero ( Matrix & I) const
inline
Bug
use fflas-ffpack

◆ isZero()

template<class Field_>
template<class Matrix1>
bool isZero ( const Matrix1 & A) const
inline
Bug
use refs

◆ isIdentity()

template<class Field_>
template<class Matrix1>
bool isIdentity ( const Matrix1 & A) const
inline
Bug
use refs
Bug
use refs

◆ isIdentityGeneralized()

template<class Field_>
template<class Matrix1>
bool isIdentityGeneralized ( const Matrix1 & A) const
inline
Bug
use refs
Bug
use refs

◆ Magnitude()

template<class Field_>
template<class myBlasMatrix>
Element & Magnitude ( Element & r,
const myBlasMatrix & A ) const
inline

linear solve with matrix right hand side.

AX=B

◆ write() [1/2]

template<class Field_>
template<class Matrix>
std::ostream & write ( std::ostream & os,
const Matrix & A ) const
inline

Print matrix.

Parameters
osOutput stream to which matrix is written.
AMatrix.
Returns
reference to os.

◆ write() [2/2]

template<class Field_>
template<class Matrix>
std::ostream & write ( std::ostream & os,
const Matrix & A,
bool maple_format ) const
inline

linear solve with matrix right hand side.

AX=B

◆ read()

template<class Field_>
template<class Matrix>
std::istream & read ( std::istream & is,
Matrix & A ) const
inline

Read matrix.

Parameters
isInput stream from which matrix is read.
AMatrix.
Returns
reference to is.

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