|
ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization 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 COP_MATRIX_SYM_IDENTITY_SERIAL_H 00030 #define COP_MATRIX_SYM_IDENTITY_SERIAL_H 00031 00032 #include "ConstrainedOptPack_Types.hpp" 00033 #include "AbstractLinAlgPack_MatrixExtractInvCholFactor.hpp" 00034 #include "AbstractLinAlgPack_MatrixSymOpNonsingSerial.hpp" 00035 00036 namespace ConstrainedOptPack { 00037 00042 class MatrixSymIdentitySerial 00043 : virtual public AbstractLinAlgPack::MatrixSymOpNonsingSerial // doxygen needs full name 00044 , virtual public AbstractLinAlgPack::MatrixExtractInvCholFactor 00045 { 00046 public: 00047 00050 00052 MatrixSymIdentitySerial( size_type size = 1, value_type scale = 1.0 ); 00053 00055 void initialize( size_type size, value_type scale ); 00056 00058 00061 00063 value_type scale() const; 00064 00066 00069 00071 size_type rows() const; 00073 size_type nz() const; 00074 00076 00079 00081 std::ostream& output(std::ostream& out) const; 00082 00084 00087 00089 void Vp_StMtV( 00090 DVectorSlice* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1 00091 ,const DVectorSlice& vs_rhs2, value_type beta) const; 00092 00094 00097 00099 void V_InvMtV( 00100 DVectorSlice* vs_lhs, BLAS_Cpp::Transp trans_rhs1,const DVectorSlice& vs_rhs2 ) const; 00101 00103 00106 00108 void M_StMtInvMtM( 00109 DMatrixSliceSym* sym_gms_lhs, value_type alpha 00110 ,const MatrixOpSerial& mwo, BLAS_Cpp::Transp mwo_trans 00111 ,EMatrixDummyArg 00112 ) const; 00113 00115 00118 00120 void extract_inv_chol( DMatrixSliceTriEle* InvChol ) const; 00121 00123 00124 private: 00125 00126 size_type size_; 00127 value_type scale_; 00128 00129 00130 }; // end class MatrixSymIdentitySerial 00131 00132 // ////////////////////////////////////// 00133 // Inline members 00134 00135 inline 00136 value_type MatrixSymIdentitySerial::scale() const 00137 { 00138 return scale_; 00139 } 00140 00141 } // end namespace ConstrainedOptPack 00142 00143 #endif // COP_MATRIX_SYM_IDENTITY_SERIAL_H
1.7.4