43 #include "AbstractLinAlgPack_LinAlgOpPackHack.hpp"
44 #include "AbstractLinAlgPack_VectorMutableDense.hpp"
45 #include "AbstractLinAlgPack_VectorDenseEncap.hpp"
46 #include "AbstractLinAlgPack_MatrixOpGetGMS.hpp"
47 #include "AbstractLinAlgPack_MatrixOpNonsing.hpp"
48 #include "AbstractLinAlgPack_MultiVectorMutable.hpp"
49 #include "AbstractLinAlgPack_VectorMutable.hpp"
50 #include "AbstractLinAlgPack_VectorSpace.hpp"
51 #include "AbstractLinAlgPack_GenPermMatrixSlice.hpp"
52 #include "AbstractLinAlgPack_LinAlgOpPack.hpp"
53 #include "DenseLinAlgPack_DMatrixOp.hpp"
57 DMatrixSlice* gms_lhs,
const MatrixOp& M_rhs,
63 M_rhs.rows(), M_rhs.cols(), trans_rhs );
65 Mp_StM(gms_lhs,1.0,M_rhs,trans_rhs);
70 DMatrixSlice* C, value_type a
79 *B_get_gms =
dynamic_cast<const MatrixOpGetGMS*
>(&B);
85 VectorSpace::multi_vec_mut_ptr_t
87 ? B.space_cols() : B.space_rows()
88 ).create_members(num_cols);
89 assign(B_mv.get(),B,B_trans);
90 for(
size_type j = 1; j <= num_cols; ++j ) {
97 DVectorSlice* y, value_type a,
const MatrixOp& M
103 VectorSpace::vec_mut_ptr_t
104 ay = ( M_trans ==
no_trans ? M.space_cols() : M.space_rows() ).create_member(),
105 ax = ( M_trans ==
no_trans ? M.space_rows() : M.space_cols() ).create_member();
106 (VectorDenseMutableEncap(*ay))() = *y;
107 (VectorDenseMutableEncap(*ax))() = x;
109 *y = VectorDenseMutableEncap(*ay)();
113 DVectorSlice* y, value_type a,
const MatrixOp& M
119 VectorSpace::vec_mut_ptr_t
120 ay = ( M_trans ==
no_trans ? M.space_cols() : M.space_rows() ).create_member();
121 (VectorDenseMutableEncap(*ay))() = *y;
123 *y = VectorDenseMutableEncap(*ay)();
127 DVectorSlice* y,
const MatrixOpNonsing& M
133 VectorSpace::vec_mut_ptr_t
134 ay = ( M_trans ==
trans ? M.space_cols() : M.space_rows() ).create_member(),
135 ax = ( M_trans ==
trans ? M.space_rows() : M.space_cols() ).create_member();
136 (VectorDenseMutableEncap(*ay))() = *y;
137 (VectorDenseMutableEncap(*ax))() = x;
139 *y = VectorDenseMutableEncap(*ay)();
143 DVector* y,
const MatrixOpNonsing& M
149 VectorSpace::vec_mut_ptr_t
150 ay = ( M_trans ==
trans ? M.space_cols() : M.space_rows() ).create_member(),
151 ax = ( M_trans ==
trans ? M.space_rows() : M.space_cols() ).create_member();
152 (VectorDenseMutableEncap(*ax))() = x;
154 *y = VectorDenseMutableEncap(*ay)();
158 DVectorSlice* y,
const MatrixOpNonsing& M
164 VectorSpace::vec_mut_ptr_t
165 ay = ( M_trans ==
trans ? M.space_cols() : M.space_rows() ).create_member();
167 *y = VectorDenseMutableEncap(*ay)();
171 DVector* y,
const MatrixOpNonsing& M
186 DVectorSlice* y, value_type a
189 ,
const DVectorSlice& x, value_type b
192 namespace mmp = MemMngPack;
197 VectorSpace::space_ptr_t
198 ay_space = ( M_trans ==
no_trans ? M.space_cols() : M.space_rows() ).space(P,P_trans);
199 VectorSpace::vec_mut_ptr_t
200 ay = ( ay_space.get()
201 ? ay_space->create_member()
202 : Teuchos::rcp_implicit_cast<VectorMutable>(
205 ax = ( M_trans ==
no_trans ? M.space_rows() : M.space_cols() ).create_member();
206 (VectorDenseMutableEncap(*ay))() = *y;
207 (VectorDenseMutableEncap(*ax))() = x;
208 Vp_StPtMtV( ay.get(), a, P, P_trans, M, M_trans, *ax, b );
209 *y = VectorDenseMutableEncap(*ay)();
213 DVectorSlice* y, value_type a
216 ,
const SpVectorSlice& x, value_type b
223 VectorSpace::vec_mut_ptr_t
224 ay = ( M_trans ==
no_trans ? M.space_cols() : M.space_rows() ).space(P,P_trans)->create_member();
225 (VectorDenseMutableEncap(*ay))() = *y;
226 Vp_StPtMtV( ay.get(), a, P, P_trans, M, M_trans, x, b );
227 *y = VectorDenseMutableEncap(*ay)();
DVector "Adaptor" subclass for DenseLinAlgPack::DVectorSlice or DenseLinAlgPack::DVector objects...
void 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
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
v_lhs = alpha * v_rhs + v_lhs
size_type rows(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
void assign(VectorMutable *v_lhs, const V &V_rhs)
v_lhs = V_rhs.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Abstract interface for objects that represent a space for mutable coordinate vectors.
Extract a constant DenseLinAlgPack::DVectorSlice view of a Vector object.
void V_InvMtV(VectorMutable *v_lhs, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
v_lhs = inv(op(M_rhs1)) * v_rhs2
void Mp_StM(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
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)
Abstract interface that allows the extraction of a const DMatrixSlice view of an abstract matrix...
Helper class type that simplifies the usage of the MatrixOpGetGMS interface for clients.
Extract a non-const DenseLinAlgPack::DVectorSlice view of a VectorMutable object. ...