AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MatrixOp non-member functions that call virtual functions.

Level-2 BLAS

void AbstractLinAlgPack::Vp_StMtV (VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
 v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV) More...
 
void AbstractLinAlgPack::Vp_StMtV (VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta=1.0)
 v_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * v_lhs (BLAS xGEMV) More...
 
void AbstractLinAlgPack::Vp_StPtMtV (VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const Vector &v_rhs3, value_type beta=1.0)
 v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * v_rhs3 + beta * v_rhs More...
 
void AbstractLinAlgPack::Vp_StPtMtV (VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta=1.0)
 v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * v_rhs More...
 
value_type AbstractLinAlgPack::transVtMtV (const Vector &v_rhs1, const MatrixOp &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3)
 result = v_rhs1' * op(M_rhs2) * v_rhs3 More...
 
value_type AbstractLinAlgPack::transVtMtV (const SpVectorSlice &sv_rhs1, const MatrixOp &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3)
 result = sv_rhs1' * op(M_rhs2) * sv_rhs3 More...
 
void AbstractLinAlgPack::syr2k (const MatrixOp &M, BLAS_Cpp::Transp M_trans, value_type alpha, const GenPermMatrixSlice &P1, BLAS_Cpp::Transp P1_trans, const GenPermMatrixSlice &P2, BLAS_Cpp::Transp P2_trans, value_type beta, MatrixSymOp *symwo_lhs)
 symwo_lhs += alpha*op(P1')*op(M)*op(P2) + alpha*op(P2')*op(M')*op(P1) + beta*symwo_lhs More...
 

Level-3 BLAS

void AbstractLinAlgPack::Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 mwo_lhs = alpha * op(mwo_rhs1) * op(mwo_rhs2) + beta * mwo_lhs (right) (xGEMM). More...
 
void AbstractLinAlgPack::syrk (const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs)
 Perform a rank-k update of a symmetric matrix of the form: More...
 

Level-1 BLAS

void AbstractLinAlgPack::Mt_S (MatrixOp *mwo_lhs, value_type alpha)
 
void AbstractLinAlgPack::Mp_StM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
 
void AbstractLinAlgPack::Mp_StMtP (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans)
 mwo_lhs += alpha * op(M_rhs) * op(P_rhs). More...
 
void AbstractLinAlgPack::Mp_StPtM (MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOp &M_rhs, BLAS_Cpp::Transp M_trans)
 mwo_lhs += alpha * op(P) * op(M_rhs). More...
 
void AbstractLinAlgPack::Mp_StPtMtP (MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans)
 mwo_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2). More...
 
void AbstractLinAlgPack::Mp_StM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp trans_rhs)
 gms_lhs += alpha * op(M_rhs) (BLAS xAXPY) More...
 
void AbstractLinAlgPack::Mp_StMtP (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans)
 gms_lhs += alpha * op(M_rhs) * op(P_rhs) More...
 
void AbstractLinAlgPack::Mp_StPtM (DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp M_trans)
 gms_lhs += alpha * op(P) * op(M_rhs) More...
 
void AbstractLinAlgPack::Mp_StPtMtP (DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp trans_rhs, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans)
 gms_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2) More...
 

Detailed Description

These allow nonmember functions to act like virtual functions. If any of these methods on the subclasses are not implemented for a particular set of matrix arguments, then the exception AbstractLinAlgPack::MatrixOp::MethodNotImplemented is thrown. This will not happen as long as a compatible (vector spaces are compatible) lhs matrix argument is passed in and dynamic_cast<MultiVectorMatrix*>(lhs) != NULL.

Function Documentation

void AbstractLinAlgPack::Mt_S ( MatrixOp *  mwo_lhs,
value_type  alpha 
)

mwo_lhs *= alpha.

If alpha == 0.0 then mwo_lhs->zero_out() will be called, otherwise mwo_lhs->Mt_S(alpha) will be called. If alpha == 1.0 then nothing is done.

Definition at line 438 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::Mp_StM ( MatrixOp *  mwo_lhs,
value_type  alpha,
const MatrixOp &  M_rhs,
BLAS_Cpp::Transp  trans_rhs 
)

mwo_lhs += alpha * op(M_rhs) (BLAS xAXPY).

Entry point for (poor man's) multiple dispatch.

This method first calls M_rhs->Mp_StM(mwo_lhs,alpha,trans_rhs) to give the rhs argument a chance to implement the operation. If M_rhs->Mp_StM(...) returns false, then mwo_lhs->Mp_StM(alpha,*this,trans_rhs) is called to give the lhs matrix argument a chance to implement the method. If mwo_lhs->Mp_StM(...) returns false, then an attempt to perform a dynamic cast the lhs matrix argument to MultiVectorMutable is attempted. If this cast failes, then an exception is thrown.

Definition at line 446 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::Mp_StMtP ( MatrixOp *  mwo_lhs,
value_type  alpha,
const MatrixOp &  M_rhs,
BLAS_Cpp::Transp  M_trans,
const GenPermMatrixSlice &  P_rhs,
BLAS_Cpp::Transp  P_rhs_trans 
)

mwo_lhs += alpha * op(M_rhs) * op(P_rhs).

Entry point for (poor man's) multiple dispatch.

ToDo: Finish documentation!

Definition at line 493 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::Mp_StPtM ( MatrixOp *  mwo_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs,
BLAS_Cpp::Transp  P_rhs_trans,
const MatrixOp &  M_rhs,
BLAS_Cpp::Transp  M_trans 
)

mwo_lhs += alpha * op(P) * op(M_rhs).

Entry point for (poor man's) multiple dispatch.

ToDo: Finish documentation!

Definition at line 520 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::Mp_StPtMtP ( MatrixOp *  mwo_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const MatrixOp &  M_rhs,
BLAS_Cpp::Transp  trans_rhs,
const GenPermMatrixSlice &  P_rhs2,
BLAS_Cpp::Transp  P_rhs2_trans 
)

mwo_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2).

Entry point for (poor man's) multiple dispatch.

ToDo: Finish documentation!

Definition at line 548 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::Vp_StMtV ( VectorMutable *  v_lhs,
value_type  alpha,
const MatrixOp &  M_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const Vector &  v_rhs2,
value_type  beta = 1.0 
)
inline

v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV)

Definition at line 857 of file AbstractLinAlgPack_MatrixOp.hpp.

void AbstractLinAlgPack::Vp_StMtV ( VectorMutable *  v_lhs,
value_type  alpha,
const MatrixOp &  M_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SpVectorSlice &  sv_rhs2,
value_type  beta = 1.0 
)
inline

v_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * v_lhs (BLAS xGEMV)

Definition at line 866 of file AbstractLinAlgPack_MatrixOp.hpp.

void AbstractLinAlgPack::Vp_StPtMtV ( VectorMutable *  v_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const MatrixOp &  M_rhs2,
BLAS_Cpp::Transp  M_rhs2_trans,
const Vector &  v_rhs3,
value_type  beta = 1.0 
)
inline

v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * v_rhs3 + beta * v_rhs

Definition at line 875 of file AbstractLinAlgPack_MatrixOp.hpp.

void AbstractLinAlgPack::Vp_StPtMtV ( VectorMutable *  v_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const MatrixOp &  M_rhs2,
BLAS_Cpp::Transp  M_rhs2_trans,
const SpVectorSlice &  sv_rhs3,
value_type  beta = 1.0 
)
inline

v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * v_rhs

Definition at line 886 of file AbstractLinAlgPack_MatrixOp.hpp.

value_type AbstractLinAlgPack::transVtMtV ( const Vector &  v_rhs1,
const MatrixOp &  M_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
const Vector &  v_rhs3 
)
inline

result = v_rhs1' * op(M_rhs2) * v_rhs3

Definition at line 897 of file AbstractLinAlgPack_MatrixOp.hpp.

value_type AbstractLinAlgPack::transVtMtV ( const SpVectorSlice &  sv_rhs1,
const MatrixOp &  M_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
const SpVectorSlice &  sv_rhs3 
)
inline

result = sv_rhs1' * op(M_rhs2) * sv_rhs3

Definition at line 906 of file AbstractLinAlgPack_MatrixOp.hpp.

void AbstractLinAlgPack::syr2k ( const MatrixOp &  M,
BLAS_Cpp::Transp  M_trans,
value_type  alpha,
const GenPermMatrixSlice &  P1,
BLAS_Cpp::Transp  P1_trans,
const GenPermMatrixSlice &  P2,
BLAS_Cpp::Transp  P2_trans,
value_type  beta,
MatrixSymOp *  symwo_lhs 
)
inline

symwo_lhs += alpha*op(P1')*op(M)*op(P2) + alpha*op(P2')*op(M')*op(P1) + beta*symwo_lhs

Definition at line 915 of file AbstractLinAlgPack_MatrixOp.hpp.

void AbstractLinAlgPack::Mp_StMtM ( MatrixOp *  mwo_lhs,
value_type  alpha,
const MatrixOp &  mwo_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const MatrixOp &  mwo_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta = 1.0 
)

mwo_lhs = alpha * op(mwo_rhs1) * op(mwo_rhs2) + beta * mwo_lhs (right) (xGEMM).

This method first calls mwo_rhs1.Mp_StMtM(...) to perform the opeation. If mwo_rhs1.Mp_StMtM(...) returns false, then mwo_rhs2.Mp_StMtM(...) is called. If mwo_rhs2.Mp_StMtM(...) returns false, then mwo_lhs.Mp_StMtM(...) is called.

As a last resort, the function attempts to cast dynamic_cast<MultiVectorMutable*>(mwo_lhs). If this dynamic cast fails, the this function throws an exception. Otherwise, the operation is implemented in terms of Vp_StMtV().

Definition at line 579 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::syrk ( const MatrixOp &  mwo_rhs,
BLAS_Cpp::Transp  M_trans,
value_type  alpha,
value_type  beta,
MatrixSymOp *  sym_lhs 
)

Perform a rank-k update of a symmetric matrix of the form:

symwo_lhs += alpha*op(mwo_rhs)*op(mwo_rhs') + beta*symwo_lhs

The default implementation returns false and does nothing.

Definition at line 631 of file AbstractLinAlgPack_MatrixOp.cpp.

void AbstractLinAlgPack::Mp_StM ( DMatrixSlice *  gms_lhs,
value_type  alpha,
const MatrixOpSerial &  M_rhs,
BLAS_Cpp::Transp  trans_rhs 
)
inline

gms_lhs += alpha * op(M_rhs) (BLAS xAXPY)

Definition at line 323 of file AbstractLinAlgPack_MatrixOpSerial.hpp.

void AbstractLinAlgPack::Mp_StMtP ( DMatrixSlice *  gms_lhs,
value_type  alpha,
const MatrixOpSerial &  M_rhs,
BLAS_Cpp::Transp  M_trans,
const GenPermMatrixSlice &  P_rhs,
BLAS_Cpp::Transp  P_rhs_trans 
)
inline

gms_lhs += alpha * op(M_rhs) * op(P_rhs)

Definition at line 330 of file AbstractLinAlgPack_MatrixOpSerial.hpp.

void AbstractLinAlgPack::Mp_StPtM ( DMatrixSlice *  gms_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs,
BLAS_Cpp::Transp  P_rhs_trans,
const MatrixOpSerial &  M_rhs,
BLAS_Cpp::Transp  M_trans 
)
inline

gms_lhs += alpha * op(P) * op(M_rhs)

Definition at line 339 of file AbstractLinAlgPack_MatrixOpSerial.hpp.

void AbstractLinAlgPack::Mp_StPtMtP ( DMatrixSlice *  gms_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const MatrixOpSerial &  M_rhs,
BLAS_Cpp::Transp  trans_rhs,
const GenPermMatrixSlice &  P_rhs2,
BLAS_Cpp::Transp  P_rhs2_trans 
)
inline

gms_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2)

Definition at line 348 of file AbstractLinAlgPack_MatrixOpSerial.hpp.