ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ConstrainedOptPack_MatrixSymPosDefInvCholFactor.hpp
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_POS_DEF_INV_CHOL_FACTOR_H
43 #define MATRIX_SYM_POS_DEF_INV_CHOL_FACTOR_H
44 
45 #include "SymInvCholMatrixClass.hpp"
46 #include "AbstractLinAlgPack_MatrixSymSecant.hpp"
47 #include "AbstractLinAlgPack_MatrixExtractInvCholFactor.hpp"
48 #include "AbstractLinAlgPack_MatrixWithOpConcreteEncap.hpp"
49 #include "AbstractLinAlgPack/src/MatrixSymWithOpFactorized.hpp"
50 #include "SerializationPack_Serializable.hpp"
51 
52 namespace ConstrainedOptPack {
53 
57  : public virtual MatrixWithOpConcreteEncap<SymInvCholMatrix>
58  , public virtual MatrixSymWithOpFactorized
59  , public MatrixSymSecant
60  , public MatrixExtractInvCholFactor
61  , public virtual SerializationPack::Serializable
62 {
63 public:
64 
67  {}
68 
70  MatrixSymPosDefInvCholFactor(const SymInvCholMatrix& m)
71  : MatrixWithOpConcreteEncap<SymInvCholMatrix>(m)
72  {}
73 
76 
78  size_type cols() const;
79 
81 
84 
86  MatrixOp& operator=(const MatrixOp& m);
88  std::ostream& output(std::ostream& out) const;
90  void Vp_StMtV(DVectorSlice* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
91  , const DVectorSlice& vs_rhs2, value_type beta) const;
93  void Vp_StMtV(DVectorSlice* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
94  , const SpVectorSlice& sv_rhs2, value_type beta) const;
96  value_type transVtMtV(const DVectorSlice& vs_rhs1, BLAS_Cpp::Transp trans_rhs2
97  , const DVectorSlice& vs_rhs3) const;
99  value_type transVtMtV(const SpVectorSlice& sv_rhs1, BLAS_Cpp::Transp trans_rhs2
100  , const SpVectorSlice& sv_rhs3) const;
101 
103 
106 
108  void V_InvMtV(DVector* v_lhs, BLAS_Cpp::Transp trans_rhs1
109  , const DVectorSlice& vs_rhs2) const;
111  void V_InvMtV(DVectorSlice* vs_lhs, BLAS_Cpp::Transp trans_rhs1
112  , const DVectorSlice& vs_rhs2) const;
114  void V_InvMtV(DVector* v_lhs, BLAS_Cpp::Transp trans_rhs1
115  , const SpVectorSlice& sv_rhs2) const;
117  void V_InvMtV(DVectorSlice* vs_lhs, BLAS_Cpp::Transp trans_rhs1
118  , const SpVectorSlice& sv_rhs2) const;
120  value_type transVtInvMtV(const DVectorSlice& vs_rhs1
121  , BLAS_Cpp::Transp trans_rhs2, const DVectorSlice& vs_rhs3) const;
123  value_type transVtInvMtV(const SpVectorSlice& sv_rhs1
124  , BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice& sv_rhs3) const;
125 
127 
130 
132  void M_StMtInvMtM( DMatrixSliceSym* sym_gms_lhs, value_type alpha
133  , const MatrixOp& mwo, BLAS_Cpp::Transp mwo_trans, EMatrixDummyArg
134  ) const;
135 
137 
140 
142  void init_identity( size_type n, value_type alpha );
144  void init_diagonal( const DVectorSlice& diag );
146  void secant_update(DVectorSlice* s, DVectorSlice* y, DVectorSlice* Bs);
147 
149 
152 
154  void extract_inv_chol( DMatrixSliceTriEle* InvChol ) const;
155 
157 
160 
162  void serialize( std::ostream &out ) const;
164  void unserialize( std::istream &in );
165 
167 
168 }; // end class MatrixSymPosDefInvCholFactor
169 
170 } // end namespace ConstrainedOptPack
171 
172 #endif // MATRIX_SYM_POS_DEF_INV_CHOL_FACTOR_H
Implementation of MatrixOp abstract interface for SymInvCholMatrix.
void M_StMtInvMtM(DMatrixSliceSym *sym_gms_lhs, value_type alpha, const MatrixOp &mwo, BLAS_Cpp::Transp mwo_trans, EMatrixDummyArg) const
void init_diagonal(const DVectorSlice &diag)
void serialize(std::ostream &out) const
void secant_update(DVectorSlice *s, DVectorSlice *y, DVectorSlice *Bs)
void Vp_StMtV(DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const
value_type transVtMtV(const DVectorSlice &vs_rhs1, BLAS_Cpp::Transp trans_rhs2, const DVectorSlice &vs_rhs3) const
std::ostream & output(std::ostream &out) const
value_type transVtInvMtV(const DVectorSlice &vs_rhs1, BLAS_Cpp::Transp trans_rhs2, const DVectorSlice &vs_rhs3) const
size_t size_type
void extract_inv_chol(DMatrixSliceTriEle *InvChol) const
void init_identity(size_type n, value_type alpha)
void V_InvMtV(DVector *v_lhs, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2) const
Transp