47 #include "AbstractLinAlgPack_MatrixNonsing.hpp"
48 #include "AbstractLinAlgPack_MultiVectorMutable.hpp"
49 #include "AbstractLinAlgPack_VectorSpace.hpp"
50 #include "AbstractLinAlgPack_SpVectorClass.hpp"
51 #include "AbstractLinAlgPack_SpVectorView.hpp"
52 #include "AbstractLinAlgPack_EtaVector.hpp"
53 #include "AbstractLinAlgPack_LinAlgOpPack.hpp"
54 #include "Teuchos_Assert.hpp"
55 #include "Teuchos_dyn_cast.hpp"
57 namespace AbstractLinAlgPack {
61 MatrixNonsing::mat_mns_mut_ptr_t
67 MatrixNonsing::mat_mns_ptr_t
85 x->set_sub_vector(sub_vec_view(sx));
103 return dot(v_rhs1,*v);
116 return dot(sv_rhs1,*v);
135 C_lhs == NULL, std::invalid_argument
136 ,
"MatrixNonsing::M_StInvMtM(...) : Error!" );
140 C_rows = C_lhs->
rows(),
141 C_cols = C_lhs->
cols();
149 M_rows = this->
rows(),
150 M_cols = this->
cols(),
153 C_rows != M_rows || M_rows != M_cols || M_cols != op_B_rows || C_cols != op_B_cols
154 , std::invalid_argument
155 ,
"MatrixNonsing::M_StInvMtM(...) : Error!" );
167 for( size_type j = 1; j <= C_cols; ++j ) {
170 LinAlgOpPack::V_StMtV( t_j.
get(), alpha, B, B_trans, e_j() );
virtual mat_mns_mut_ptr_t clone_mns()
Clone the non-const matrix object (if supported).
virtual const VectorSpace & space_rows() const =0
Vector space for vectors that are compatible with the rows of the matrix.
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
friend void V_InvMtV(VectorMutable *v_lhs, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
Sparse Vector Slice class template.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
size_type rows(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
T_To & dyn_cast(T_From &from)
virtual size_type cols() const
Return the number of columns in the matrix.
friend void M_StMtInvM(MatrixOp *m_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
Create an eta vector (scaled by alpha = default 1).
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
Base class for all matrices that support basic matrix operations.
friend value_type transVtInvMtV(const Vector &v_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3)
value_type dot(const Vector &v_rhs1, const Vector &v_rhs2)
result = v_rhs1' * v_rhs2
Interface for a collection of mutable vectors (multi-vector, matrix).
virtual const VectorSpace & space_cols() const =0
Vector space for vectors that are compatible with the columns of the matrix.
Abstract interface for mutable coordinate vectors {abstract}.
virtual size_type rows() const
Return the number of rows in the matrix.
friend void M_StInvMtM(MatrixOp *m_lhs, value_type alpha, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2)
virtual vec_mut_ptr_t col(index_type j)=0
Get a mutable column vector.
Abstract base class for all nonsingular polymorphic matrices that can solve for linear system with bu...
size_type cols(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
size_type nz() const
Return the number of non-zero elements.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)