queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
TKGroup.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_TRANSITION_KERNEL_GROUP_H
26 #define UQ_TRANSITION_KERNEL_GROUP_H
27 
28 #include <queso/VectorRV.h>
29 #include <queso/GaussianVectorRV.h>
30 #include <queso/ScalarFunctionSynchronizer.h>
31 
32 namespace QUESO {
33 
34 class GslVector;
35 class GslMatrix;
36 
49 template <class V = GslVector, class M = GslMatrix>
50 class BaseTKGroup {
51 public:
53 
54  BaseTKGroup();
56 
58  BaseTKGroup(const char* prefix,
59  const VectorSpace<V,M>& vectorSpace,
60  const std::vector<double>& scales);
62  virtual ~BaseTKGroup();
64 
66 
67  virtual bool symmetric () const = 0;
69 
71  virtual const BaseVectorRV<V,M>& rv (unsigned int stageId ) const = 0;
72 
74  virtual const BaseVectorRV<V,M>& rv (const std::vector<unsigned int>& stageIds) = 0;
75 
77  virtual const BaseVectorRV<V, M> & rv(const V & position) const = 0;
79 
81 
82  const BaseEnvironment& env() const;
84 
86  const V& preComputingPosition (unsigned int stageId) const;
87 
89  virtual bool setPreComputingPosition (const V& position, unsigned int stageId);
90 
92  virtual void clearPreComputingPositions();
93 
95  virtual unsigned int set_dr_stage(unsigned int stageId);
96 
99 
102  virtual void updateTK() { };
103 
106 
110  virtual bool covMatrixIsDirty() = 0;
111 
114 
117  virtual void cleanCovMatrix() = 0;
119 
121 
122 
124  virtual void print (std::ostream& os) const;
126 protected:
129  std::string m_prefix;
131  std::vector<double> m_scales;
132  std::vector<const V*> m_preComputingPositions;
133  std::vector<BaseVectorRV<V,M>* > m_rvs; // Gaussian, not Base... And nothing const...
134  unsigned int m_stageId;
135 };
136 
137 } // End namespace QUESO
138 
139 #endif // UQ_TRANSITION_KERNEL_GROUP_H
std::string m_prefix
Definition: TKGroup.h:129
const BaseEnvironment & env() const
QUESO&#39;s environment.
Definition: TKGroup.C:80
unsigned int m_stageId
Definition: TKGroup.h:134
std::vector< const V * > m_preComputingPositions
Definition: TKGroup.h:132
A class representing a vector space.
Definition: VectorSet.h:49
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
virtual void cleanCovMatrix()=0
std::vector< BaseVectorRV< V, M > * > m_rvs
Definition: TKGroup.h:133
const BaseEnvironment & m_env
Definition: TKGroup.h:128
virtual const BaseVectorRV< V, M > & rv(unsigned int stageId) const =0
Gaussian increment property to construct a transition kernel. See template specialization.
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
Definition: TKGroup.C:133
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
Definition: TKGroup.C:111
This class sets up the environment underlying the use of the QUESO library by an executable.
Definition: Environment.h:484
virtual void updateTK()
Definition: TKGroup.h:102
virtual ~BaseTKGroup()
Destructor.
Definition: TKGroup.C:67
const EmptyEnvironment * m_emptyEnv
Definition: TKGroup.h:127
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
Definition: TKGroup.C:87
virtual bool covMatrixIsDirty()=0
const VectorSpace< V, M > * m_vectorSpace
Definition: TKGroup.h:130
BaseTKGroup()
Default constructor.
Definition: TKGroup.C:33
std::vector< double > m_scales
Definition: TKGroup.h:131
virtual unsigned int set_dr_stage(unsigned int stageId)
Does nothing. Subclasses may re-implement. Returns the current stage id.
Definition: TKGroup.C:125
virtual bool symmetric() const =0
Whether or not the matrix is symmetric. See template specialization.
virtual bool setPreComputingPosition(const V &position, unsigned int stageId)
Sets the pre-computing positions m_preComputingPositions[stageId] with a new vector of size position...
Definition: TKGroup.C:98

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