MOOCHO (Single Doxygen Collection) Version of the Day
ConstrainedOptPack_MatrixSymHessianRelaxNonSing.hpp
Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef MATRIX_SYM_HESSIAN_RELAX_NON_SING_H
00030 #define MATRIX_SYM_HESSIAN_RELAX_NON_SING_H
00031 
00032 #include "ConstrainedOptPack_Types.hpp"
00033 #include "AbstractLinAlgPack_MatrixSymDiagStd.hpp"
00034 #include "Teuchos_RCP.hpp"
00035 
00036 namespace ConstrainedOptPack {
00037 
00049 class MatrixSymHessianRelaxNonSing
00050   : public AbstractLinAlgPack::MatrixSymOpNonsing
00051 {
00052 public:
00053 
00055   typedef Teuchos::RCP<const MatrixSymOpNonsing>  G_ptr_t;
00057   typedef Teuchos::RCP<VectorMutable>               vec_mut_ptr_t;
00059   typedef Teuchos::RCP<const VectorSpace>                 space_ptr_t;
00060   
00063 
00073   MatrixSymHessianRelaxNonSing();
00074 
00077   MatrixSymHessianRelaxNonSing(
00078     const G_ptr_t         &G_ptr
00079     ,const vec_mut_ptr_t  &M_diag_ptr
00080     ,const space_ptr_t    &space = Teuchos::null
00081     );
00082 
00111   void initialize(
00112     const G_ptr_t         &G_ptr
00113     ,const vec_mut_ptr_t  &M_diag_ptr
00114     ,const space_ptr_t    &space = Teuchos::null
00115     );
00116 
00120   void set_uninitialized();
00121   
00123   const G_ptr_t& G_ptr() const;
00124 
00126   const vec_mut_ptr_t& M_diag_ptr() const;
00127 
00129   const MatrixSymOpNonsing& G() const;
00130 
00132   const AbstractLinAlgPack::MatrixSymDiagStd& M() const;
00133 
00135   
00138 
00140   const VectorSpace& space_cols() const;
00142   bool Mp_StM(
00143     MatrixOp* mwo_lhs, value_type alpha
00144     , BLAS_Cpp::Transp trans_rhs) const;
00146   void Vp_StMtV(
00147     VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
00148     ,const Vector& v_rhs2, value_type beta) const;
00150   void Vp_StMtV(
00151     VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
00152     ,const SpVectorSlice& sv_rhs2, value_type beta) const;
00154   void Vp_StPtMtV(
00155     VectorMutable* v_lhs, value_type alpha
00156     ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
00157     ,BLAS_Cpp::Transp M_rhs2_trans
00158     ,const Vector& v_rhs3, value_type beta) const;
00160   void Vp_StPtMtV(
00161     VectorMutable* v_lhs, value_type alpha
00162     ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
00163     ,BLAS_Cpp::Transp M_rhs2_trans
00164     ,const SpVectorSlice& sv_rhs3, value_type beta) const;
00165 
00167 
00170 
00172   void Mp_StPtMtP(
00173     MatrixSymOp* sym_lhs, value_type alpha
00174     ,EMatRhsPlaceHolder dummy_place_holder
00175     ,const GenPermMatrixSlice& gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans
00176     ,value_type beta
00177     ) const;
00178 
00180 
00183 
00185   void V_InvMtV(
00186     VectorMutable* v_lhs, BLAS_Cpp::Transp trans_rhs1
00187     ,const Vector& v_rhs2) const;
00189   void V_InvMtV(
00190     VectorMutable* v_lhs, BLAS_Cpp::Transp trans_rhs1
00191     ,const SpVectorSlice& sv_rhs2) const;
00192 
00194 
00195 private:
00196   
00197   // ///////////////////////////////
00198   // Private data members
00199 
00200   space_ptr_t              vec_space_;
00201   G_ptr_t                  G_ptr_;
00202   MatrixSymDiagStd     M_;
00203 
00204   // ///////////////////////////////
00205   // Private member functions
00206 
00207   void assert_initialized() const;
00208 
00209 };
00210 
00211 // ////////////////////////////////////
00212 // Inline members
00213 
00214 inline
00215 const MatrixSymHessianRelaxNonSing::G_ptr_t&
00216 MatrixSymHessianRelaxNonSing::G_ptr() const
00217 {
00218   return G_ptr_;
00219 }
00220 
00221 inline
00222 const MatrixSymHessianRelaxNonSing::vec_mut_ptr_t&
00223 MatrixSymHessianRelaxNonSing::M_diag_ptr() const
00224 {
00225   return M_.diag_ptr();
00226 }
00227 
00228 inline
00229 const MatrixSymOpNonsing&
00230 MatrixSymHessianRelaxNonSing::G() const
00231 {
00232   assert_initialized();
00233   return *G_ptr_;
00234 }
00235 
00236 inline
00237 const MatrixSymDiagStd&
00238 MatrixSymHessianRelaxNonSing::M() const
00239 {
00240   assert_initialized();
00241   return M_;
00242 }
00243   
00244 } // end namespace ConstrainedOptPack
00245 
00246 #endif // MATRIX_SYM_HESSIAN_RELAX_NON_SING_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines