queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
HessianCovMatricesTKGroup.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2017 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_HESSIANCOV_TRANSITION_KERNEL_GROUP_H
26 #define UQ_HESSIANCOV_TRANSITION_KERNEL_GROUP_H
27 
28 #include <queso/TKGroup.h>
29 #include <queso/VectorRV.h>
30 #include <queso/ScalarFunctionSynchronizer.h>
31 
32 namespace QUESO {
33 
34 class GslVector;
35 class GslMatrix;
36 
37 //*****************************************************
38 // TK with Hessians
39 //*****************************************************
43 template <class V = GslVector, class M = GslMatrix>
45 public:
47 
48  HessianCovMatricesTKGroup(const char* prefix,
50  const VectorSpace<V,M>& vectorSpace,
51  const std::vector<double>& scales,
52  const ScalarFunctionSynchronizer<V,M>& targetPdfSynchronizer);
53 
57 
59 
60 
62  bool symmetric () const;
63 
65  const GaussianVectorRV<V,M>& rv (unsigned int stageId ) const;
66 
68  const GaussianVectorRV<V,M>& rv (const std::vector<unsigned int>& stageIds);
69 
70  virtual const GaussianVectorRV<V, M> & rv(const V & position) const;
72 
74 
75  bool setPreComputingPosition (const V& position, unsigned int stageId );
77 
80 
81  virtual unsigned int set_dr_stage(unsigned int stageId);
82 
83  virtual bool covMatrixIsDirty() { return false; }
84  virtual void cleanCovMatrix() { }
86 
88 
89 
91  void print (std::ostream& os) const;
93 private:
100 
102  std::vector<V*> m_originalNewtonSteps;
103  std::vector<M*> m_originalCovMatrices;
104 };
105 
106 } // End namespace QUESO
107 
108 #endif // UQ_HESSIANCOV_TRANSITION_KERNEL_GROUP_H
A templated class for synchronizing the calls of scalar functions (BaseScalarFunction and derived cla...
A class representing a vector space.
Definition: VectorSet.h:49
A class representing a Gaussian vector RV.
const ScalarFunctionSynchronizer< V, M > & m_targetPdfSynchronizer
This class allows the representation of a transition kernel with Hessians.
HessianCovMatricesTKGroup(const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< double > &scales, const ScalarFunctionSynchronizer< V, M > &targetPdfSynchronizer)
Default constructor.
void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
bool symmetric() const
Whether or not the matrix is symmetric. Always &#39;false&#39;.
bool setPreComputingPosition(const V &position, unsigned int stageId)
Sets the pre-computing positions m_preComputingPositions[stageId] with a new vector of size position...
This base class allows the representation of a transition kernel.
Definition: Algorithm.h:32
void print(std::ostream &os) const
TODO: Prints the transition kernel.
const GaussianVectorRV< V, M > & rv(unsigned int stageId) const
Gaussian increment property to construct a transition kernel.
virtual unsigned int set_dr_stage(unsigned int stageId)
Does nothing. Subclasses may re-implement. Returns the current stage id.

Generated on Tue Jun 5 2018 19:48:55 for queso-0.57.1 by  doxygen 1.8.5