|
AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
|
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_WITH_OP_H 00030 #define MATRIX_SYM_WITH_OP_H 00031 00032 #include "AbstractLinAlgPack_MatrixOp.hpp" 00033 00034 namespace AbstractLinAlgPack { 00035 00053 class MatrixSymOp : public virtual MatrixOp { 00054 public: 00055 00057 using MatrixOp::Mp_StPtMtP; 00058 00061 00062 #ifndef DOXYGEN_COMPILE 00063 00064 typedef Teuchos::RCP<const MatrixSymOp> mat_mswo_ptr_t; 00066 typedef Teuchos::RCP<MatrixSymOp> mat_mswo_mut_ptr_t; 00067 #endif 00068 00069 enum EMatRhsPlaceHolder { DUMMY_ARG }; 00070 00072 00075 00077 friend 00078 void Mp_StPtMtP( 00079 MatrixSymOp* sym_lhs, value_type alpha 00080 ,EMatRhsPlaceHolder dummy_place_holder 00081 ,const MatrixSymOp& M 00082 ,const GenPermMatrixSlice& gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans 00083 ,value_type beta 00084 ); 00086 friend 00087 void Mp_StMtMtM( 00088 MatrixSymOp* sym_lhs, value_type alpha 00089 ,EMatRhsPlaceHolder dummy_place_holder 00090 ,const MatrixSymOp& M 00091 ,const MatrixOp& mwo_rhs, BLAS_Cpp::Transp mwo_rhs_trans 00092 ,value_type beta 00093 ); 00094 00096 00099 00106 virtual mat_mswo_mut_ptr_t clone_mswo(); 00107 00113 virtual mat_mswo_ptr_t clone_mswo() const; 00114 00116 00117 protected: 00118 00121 00128 virtual void Mp_StPtMtP( 00129 MatrixSymOp* sym_lhs, value_type alpha 00130 ,EMatRhsPlaceHolder dummy_place_holder 00131 ,const GenPermMatrixSlice& gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans 00132 ,value_type beta 00133 ) const; 00134 00136 00139 00146 virtual void Mp_StMtMtM( 00147 MatrixSymOp* sym_lhs, value_type alpha 00148 ,EMatRhsPlaceHolder dummy_place_holder 00149 ,const MatrixOp& mwo_rhs, BLAS_Cpp::Transp mwo_rhs_trans 00150 ,value_type beta 00151 ) const; 00152 00154 00155 public: 00156 00159 00160 size_type cols() const; 00161 // Returns <tt>this->space_cols()</tt> 00162 const VectorSpace& space_rows() const; 00164 mat_mut_ptr_t clone(); 00166 mat_ptr_t clone() const; 00168 00170 virtual MatrixSymOp& operator=(const MatrixSymOp& M) 00171 { static_cast<MatrixOp*>(this)->operator=(M); return *this; } 00172 00173 }; // end class MatrixSymOp 00174 00180 00181 inline 00183 void Mp_StPtMtP( 00184 MatrixSymOp* sym_lhs, value_type alpha 00185 ,MatrixSymOp::EMatRhsPlaceHolder dummy_place_holder 00186 ,const MatrixSymOp& M 00187 ,const GenPermMatrixSlice& gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans 00188 ,value_type beta = 1.0 00189 ) 00190 { 00191 M.Mp_StPtMtP(sym_lhs,alpha,dummy_place_holder,gpms_rhs,gpms_rhs_trans,beta); 00192 } 00193 00194 inline 00196 void Mp_StMtMtM( 00197 MatrixSymOp* sym_lhs, value_type alpha 00198 ,MatrixSymOp::EMatRhsPlaceHolder dummy_place_holder 00199 ,const MatrixSymOp& M 00200 ,const MatrixOp& mwo_rhs, BLAS_Cpp::Transp mwo_rhs_trans 00201 ,value_type beta = 1.0 00202 ) 00203 { 00204 M.Mp_StMtMtM(sym_lhs,alpha,dummy_place_holder,mwo_rhs,mwo_rhs_trans,beta); 00205 } 00206 00208 00209 } // end namespace AbstractLinAlgPack 00210 00211 #endif // MATRIX_SYM_WITH_OP_H
1.7.4