MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConstrainedOptPack_MatrixSymHessianRelaxNonSing.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef MATRIX_SYM_HESSIAN_RELAX_NON_SING_H
43 #define MATRIX_SYM_HESSIAN_RELAX_NON_SING_H
44 
47 #include "Teuchos_RCP.hpp"
48 
49 namespace ConstrainedOptPack {
50 
64 {
65 public:
66 
73 
76 
87 
91  const G_ptr_t &G_ptr
93  ,const space_ptr_t &space = Teuchos::null
94  );
95 
124  void initialize(
125  const G_ptr_t &G_ptr
126  ,const vec_mut_ptr_t &M_diag_ptr
127  ,const space_ptr_t &space = Teuchos::null
128  );
129 
133  void set_uninitialized();
134 
136  const G_ptr_t& G_ptr() const;
137 
139  const vec_mut_ptr_t& M_diag_ptr() const;
140 
142  const MatrixSymOpNonsing& G() const;
143 
146 
148 
151 
153  const VectorSpace& space_cols() const;
155  bool Mp_StM(
156  MatrixOp* mwo_lhs, value_type alpha
157  , BLAS_Cpp::Transp trans_rhs) const;
159  void Vp_StMtV(
160  VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
161  ,const Vector& v_rhs2, value_type beta) const;
163  void Vp_StMtV(
164  VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
165  ,const SpVectorSlice& sv_rhs2, value_type beta) const;
167  void Vp_StPtMtV(
168  VectorMutable* v_lhs, value_type alpha
169  ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
170  ,BLAS_Cpp::Transp M_rhs2_trans
171  ,const Vector& v_rhs3, value_type beta) const;
173  void Vp_StPtMtV(
174  VectorMutable* v_lhs, value_type alpha
175  ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
176  ,BLAS_Cpp::Transp M_rhs2_trans
177  ,const SpVectorSlice& sv_rhs3, value_type beta) const;
178 
180 
183 
185  void Mp_StPtMtP(
186  MatrixSymOp* sym_lhs, value_type alpha
187  ,EMatRhsPlaceHolder dummy_place_holder
188  ,const GenPermMatrixSlice& gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans
189  ,value_type beta
190  ) const;
191 
193 
196 
198  void V_InvMtV(
199  VectorMutable* v_lhs, BLAS_Cpp::Transp trans_rhs1
200  ,const Vector& v_rhs2) const;
202  void V_InvMtV(
203  VectorMutable* v_lhs, BLAS_Cpp::Transp trans_rhs1
204  ,const SpVectorSlice& sv_rhs2) const;
205 
207 
208 private:
209 
210  // ///////////////////////////////
211  // Private data members
212 
215  MatrixSymDiagStd M_;
216 
217  // ///////////////////////////////
218  // Private member functions
219 
220  void assert_initialized() const;
221 
222 };
223 
224 // ////////////////////////////////////
225 // Inline members
226 
227 inline
230 {
231  return G_ptr_;
232 }
233 
234 inline
237 {
238  return M_.diag_ptr();
239 }
240 
241 inline
242 const MatrixSymOpNonsing&
244 {
246  return *G_ptr_;
247 }
248 
249 inline
250 const MatrixSymDiagStd&
252 {
254  return M_;
255 }
256 
257 } // end namespace ConstrainedOptPack
258 
259 #endif // MATRIX_SYM_HESSIAN_RELAX_NON_SING_H
void V_InvMtV(VectorMutable *v_lhs, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2) const
Abstract base class for all polymorphic symmetrix nonsingular matrices that can be used to compute ma...
void initialize(const G_ptr_t &G_ptr, const vec_mut_ptr_t &M_diag_ptr, const space_ptr_t &space=Teuchos::null)
Initialize the Hessian and the relaxation terms.
void Mp_StPtMtP(MatrixSymOp *sym_lhs, value_type alpha, EMatRhsPlaceHolder dummy_place_holder, const GenPermMatrixSlice &gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans, value_type beta) const
Matrix class for non-singular Hessian matrix augmented with a terms for "Big M" relaxation variables...
SparseVectorSlice< SparseElement< index_type, value_type > > SpVectorSlice
AbstractLinAlgPack::value_type value_type
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
Transp
TRANS.
void Vp_StPtMtV(VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const Vector &v_rhs3, value_type beta) const
bool Mp_StM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const