52 namespace ConstrainedOptPack {
74 const char func_name[] =
"MatrixDecompRangeOrthog::initialize(...)";
76 C_ptr.get() == NULL, std::invalid_argument
77 ,func_name <<
" : Error!" );
79 D_ptr.get() == NULL, std::invalid_argument
80 ,func_name <<
" : Error!" );
82 S_ptr.get() == NULL, std::invalid_argument
83 ,func_name <<
" : Error!" );
84 #ifdef ABSTRACT_LIN_ALG_PACK_CHECK_VEC_SPCS
85 bool is_compatible = C_ptr->space_rows().is_compatible(D_ptr->space_cols());
87 !is_compatible, VectorSpace::IncompatibleVectorSpaces
88 ,func_name <<
" : Error, C_ptr->space_rows().is_compatible(D_ptr->space_cols()) == false!" );
89 is_compatible = S_ptr->space_cols().is_compatible(D_ptr->space_rows());
91 !is_compatible, VectorSpace::IncompatibleVectorSpaces
92 ,func_name <<
" : Error, S_ptr->space_cols().is_compatible(D_ptr->space_rows()) == false!" );
101 namespace rcp = MemMngPack;
111 return C_ptr_.get() ? C_ptr_->rows() : 0;
116 return C_ptr_.get() ? C_ptr_->cols() : 0;
121 return C_ptr_->space_cols();
126 return C_ptr_->space_rows();
134 <<
"This is a " << this->
rows() <<
" x " << this->
cols()
135 <<
" nonsingular matrix (I + D'*D)*C with inverse inv(C')*(I + D*inv(S)*D') where C, D and S are:\n";
137 *out <<
"C =\n" << *
C_ptr();
138 *out <<
"D =\n" << *
D_ptr();
139 *out <<
"S =\n" << *
S_ptr();
160 const MatrixOpNonsing &
C = *C_ptr_;
161 const MatrixOp &
D = *D_ptr_;
162 const MatrixSymOpNonsing &
S = *S_ptr_;
166 VectorSpace::vec_mut_ptr_t
168 tD = D.space_cols().create_member();
182 Vp_StMtV( y, a, C, no_trans, *tD, b );
222 const MatrixOpNonsing &
C = *C_ptr_;
223 const MatrixOp &
D = *D_ptr_;
224 const MatrixSymOpNonsing &
S = *S_ptr_;
228 VectorSpace::vec_mut_ptr_t
230 tIb = D.space_rows().create_member(),
231 tD = D.space_cols().create_member();
247 Vp_StMtV( y, -1.0, D, no_trans, *tIb );
274 C_ptr_.get() == NULL, std::logic_error
275 ,func_name <<
" : Error, Must call initialize(...) first!" );
AbstractLinAlgPack::size_type size_type
std::ostream & output(std::ostream &out) const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
v_lhs = alpha * v_rhs + v_lhs
basic_OSTab< CharT, Traits > & incrTab(const int tabs=1)
void V_InvMtV(VectorMutable *v_lhs, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2) const
const D_ptr_t & D_ptr() const
AbstractLinAlgPack::MatrixOpNonsing * C
void initialize(const C_ptr_t &C_ptr, const D_ptr_t &D_ptr, const S_ptr_t &S_ptr)
Initialize the matrix object.
void V_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const V &V_rhs2)
v_lhs = alpha * op(M_rhs1) * V_rhs2.
const VectorSpace & space_rows() const
Vector space for vectors that are compatible with the rows of the matrix.
void Vp_MtV(VectorMutable *v_lhs, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const V &V_rhs2)
v_lhs += op(M_rhs1) * V_rhs2.
const S_ptr_t & S_ptr() const
const VectorSpace & space_rows() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
void assert_initialized(const char func_name[]) const
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 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)
MatrixDecompRangeOrthog()
Constructs uninitialized.
const f_int f_dbl_prec a[]
Transp trans_not(Transp _trans)
Return the opposite of the transpose argument.
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.
AbstractLinAlgPack::value_type value_type
void set_uninitialized()
Make uninitialized.
void Vp_MtV_assert_compatibility(VectorMutable *v_lhs, const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
v_lhs += op(m_rhs1) * v_rhs2
virtual vec_mut_ptr_t create_member() const =0
Create a vector member from the vector space.
AbstractLinAlgPack::MatrixSymOpNonsing * S
const VectorSpace & space_cols() const
AbstractLinAlgPack::MatrixOp * D
const C_ptr_t & C_ptr() const
void Vp_V(VectorMutable *v_lhs, const V &V_rhs)
v_lhs += V_rhs.