42 #ifndef DENSE_V_P_S_T_P_T_M_T_V_H
43 #define DENSE_V_P_S_T_P_T_M_T_V_H
45 #include "AbstractLinAlgPack/src/AbstractLinAlgPack_SpVectorClass.hpp"
47 #include "AbstractLinAlgPack/src/AbstractLinAlgPack_EtaVector.hpp"
48 #include "AbstractLinAlgPack/src/AbstractLinAlgPack_GenPermMatrixSlice.hpp"
54 #include "MiWorkspacePack.h"
56 namespace AbstractLinAlgPack {
64 template<
class M_t,
class V_t>
98 opM_rows =
rows( M.rows(), M.cols(), M_trans ),
99 opM_cols =
cols( M.rows(), M.cols(), M_trans );
103 throw std::length_error(
"MatrixOp::Vp_StPtMtV(...) : Error, "
104 "sizes of arguments does not match up" );
118 else if(b!=1.0)
Vt_S(y,b);
122 Workspace<value_type> t_ws(wss,opM_rows);
126 Vp_StMtV( y, a, P, P_trans, t(), b );
131 else if(b!=1.0)
Vt_S(y,b);
133 Workspace<value_type> t_ws(wss,opM_cols);
143 (*y)(i) += a *
dot( t(), x );
149 i = P_trans ==
no_trans ? itr->row_i() : itr->col_j(),
150 j = P_trans ==
no_trans ? itr->col_j() : itr->row_i();
154 (*y)(i) += a *
dot( t(), x );
162 #endif // DENSE_V_P_S_T_P_T_M_T_V_H
Teuchos::Ordinal size_type
Typedef for the size type of elements that are used by the library.
void Vt_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs *= alpha
RTOp_value_type value_type
size_type rows(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
Return rows of a possible transposed matrix.
const_iterator end() const
Return the end of this->const_iterator_begin().
This is a full random access iterator for accessing row and colunmn indices.
RTOp_index_type size_type
const_iterator begin() const
Return a random access iterator for accessing which row and column that each nonzero 1...
const LAPACK_C_Decl::f_int & M
Create an eta vector (scaled by alpha = default 1).
void 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)
const f_int f_dbl_prec a[]
value_type dot(const Vector &v_rhs1, const Vector &v_rhs2)
result = v_rhs1' * v_rhs2
Transp trans_not(Transp _trans)
Return the opposite of the transpose argument.
void Vt_S(DVectorSlice *vs_lhs, value_type alpha)
vs_lhs *= alpha (BLAS xSCAL) (*** Note that alpha == 0.0 is handeled as vs_lhs = 0.0)
void V_MtV(VectorMutable *v_lhs, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const V &V_rhs2)
v_lhs = op(M_rhs1) * V_rhs2.
VectorTmpl< value_type > DVector
void dense_Vp_StPtMtV(DVectorSlice *y, value_type a, const GenPermMatrixSlice &P, BLAS_Cpp::Transp P_trans, const M_t &M, BLAS_Cpp::Transp M_trans, const V_t &x, value_type b)
Implements y = b*y + a*op(P)*op(M)*x where it is assumed that generating rows of op(M) is cheap compa...
size_type cols(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
Return columns of a possible transposed matrix.
TEUCHOSCORE_LIB_DLL_EXPORT Teuchos::RCP< WorkspaceStore > get_default_workspace_store()
Concrete matrix type to represent general permutation (mapping) matrices.
value_type dot(const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
result = vs_rhs1' * vs_rhs2 (BLAS xDOT)