|
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 // Redistribution and use in source and binary forms, with or without 00011 // modification, are permitted provided that the following conditions are 00012 // met: 00013 // 00014 // 1. Redistributions of source code must retain the above copyright 00015 // notice, this list of conditions and the following disclaimer. 00016 // 00017 // 2. Redistributions in binary form must reproduce the above copyright 00018 // notice, this list of conditions and the following disclaimer in the 00019 // documentation and/or other materials provided with the distribution. 00020 // 00021 // 3. Neither the name of the Corporation nor the names of the 00022 // contributors may be used to endorse or promote products derived from 00023 // this software without specific prior written permission. 00024 // 00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 // 00037 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 00038 // 00039 // *********************************************************************** 00040 // @HEADER 00041 00042 #ifndef SLAP_MULTI_VECTOR_MUTABLE_COlS_H 00043 #define SLAP_MULTI_VECTOR_MUTABLE_COlS_H 00044 00045 #include <vector> 00046 00047 #include "AbstractLinAlgPack_Types.hpp" 00048 #include "AbstractLinAlgPack_MultiVectorMutable.hpp" 00049 #include "AbstractLinAlgPack_VectorSpace.hpp" 00050 #include "AbstractLinAlgPack_VectorMutable.hpp" 00051 00052 namespace AbstractLinAlgPack { 00053 00068 class MultiVectorMutableCols 00069 : virtual public AbstractLinAlgPack::MultiVectorMutable 00070 { 00071 public: 00072 00075 00077 MultiVectorMutableCols(); 00078 00080 MultiVectorMutableCols( 00081 const Teuchos::RCP<const VectorSpace> &space_cols 00082 ,const Teuchos::RCP<const VectorSpace> &space_rows 00083 ,Teuchos::RCP<VectorMutable> col_vecs[] = NULL 00084 ); 00085 00118 void initialize( 00119 const Teuchos::RCP<const VectorSpace> &space_cols 00120 ,const Teuchos::RCP<const VectorSpace> &space_rows 00121 ,Teuchos::RCP<VectorMutable> col_vecs[] = NULL 00122 ); 00123 00125 void set_uninitialized(); 00126 00128 00131 00133 size_type rows() const; 00135 size_type cols() const; 00136 00138 00141 00143 const VectorSpace& space_cols() const; 00145 const VectorSpace& space_rows() const; 00147 void zero_out(); 00149 void Mt_S( value_type alpha ); 00151 MatrixOp& operator=(const MatrixOp& mwo_rhs); 00153 mat_mut_ptr_t clone(); 00155 mat_ptr_t clone() const; 00157 void Vp_StMtV( 00158 VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1 00159 , const Vector& v_rhs2, value_type beta) const; 00161 void Vp_StMtV( 00162 VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1 00163 , const SpVectorSlice& sv_rhs2, value_type beta) const; 00165 bool syrk( 00166 BLAS_Cpp::Transp M_trans, value_type alpha 00167 , value_type beta, MatrixSymOp* sym_lhs ) const; 00168 00171 00172 access_by_t access_by() const; 00174 00178 vec_mut_ptr_t col(index_type j); 00180 vec_mut_ptr_t row(index_type i); 00182 vec_mut_ptr_t diag(int k); 00184 multi_vec_mut_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng); 00186 00187 private: 00188 00189 #ifdef DOXYGEN_COMPILE 00190 const VectorSpace *space_cols; 00191 const VectorSpace *space_rows; 00192 VectorMutable *column_vectors; 00193 #else 00194 Teuchos::RCP<const VectorSpace> space_cols_; 00195 Teuchos::RCP<const VectorSpace> space_rows_; 00196 std::vector< Teuchos::RCP<VectorMutable> > col_vecs_; 00197 #endif 00198 00199 }; // end class MultiVectorMutableCols 00200 00201 } // end namespace AbstractLinAlgPack 00202 00203 #endif // SLAP_MULTI_VECTOR_MUTABLE_COlS_H
1.7.6.1