|
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 ALAP_MULTI_VECTOR_MUTABLE_H 00030 #define ALAP_MULTI_VECTOR_MUTABLE_H 00031 00032 #include "AbstractLinAlgPack_MultiVector.hpp" 00033 00034 namespace AbstractLinAlgPack { 00035 00069 class MultiVectorMutable : virtual public MultiVector { 00070 public: 00071 00073 using MultiVector::col; 00075 using MultiVector::row; 00077 using MultiVector::diag; 00078 00080 typedef Teuchos::RCP<VectorMutable> vec_mut_ptr_t; 00082 typedef Teuchos::RCP<MultiVectorMutable> multi_vec_mut_ptr_t; 00083 00086 00092 virtual multi_vec_mut_ptr_t mv_clone(); 00093 00095 00098 00108 virtual vec_mut_ptr_t col(index_type j) = 0; 00118 virtual vec_mut_ptr_t row(index_type i) = 0; 00127 virtual vec_mut_ptr_t diag(int k) = 0; 00128 00130 00133 00141 virtual multi_vec_mut_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng); 00142 00145 multi_vec_mut_ptr_t mv_sub_view( 00146 const index_type& rl, const index_type& ru 00147 ,const index_type& cl, const index_type& cu 00148 ); 00149 00151 00154 00156 mat_mut_ptr_t clone(); 00158 void zero_out(); 00160 void Mt_S( value_type alpha ); 00162 MatrixOp& operator=(const MatrixOp& mwo_rhs); 00164 bool Mp_StM( 00165 MatrixOp* mwo_lhs, value_type alpha 00166 ,BLAS_Cpp::Transp trans_rhs 00167 ) const; 00169 bool Mp_StM( 00170 value_type alpha,const MatrixOp& M_rhs, BLAS_Cpp::Transp trans_rhs 00171 ); 00172 00174 00177 00179 multi_vec_ptr_t mv_clone() const; 00181 vec_ptr_t col(index_type j) const; 00183 vec_ptr_t row(index_type i) const; 00185 vec_ptr_t diag(int k) const; 00187 multi_vec_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng) const; 00188 00190 00191 }; // end class MultiVectorMutable 00192 00193 // ////////////////////////////////////////////////// 00194 // Inlined methods for MultiVector 00195 00196 inline 00197 MultiVectorMutable::multi_vec_mut_ptr_t 00198 MultiVectorMutable::mv_sub_view( 00199 const index_type& rl, const index_type& ru 00200 ,const index_type& cl, const index_type& cu 00201 ) 00202 { 00203 return this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu)); 00204 } 00205 00206 } // end namespace AbstractLinAlgPack 00207 00208 #endif // ALAP_MULTI_VECTOR_MUTABLE_H
1.7.4