queso-0.50.1
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,2009,2010,2011,2012,2013 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/GaussianVectorRV.h>
29 #include <queso/ScalarFunctionSynchronizer.h>
30 
31 namespace QUESO {
32 
33 //*****************************************************
34 // Base class
35 //*****************************************************
47 template<class V, class M>
48 class BaseTKGroup {
49 public:
51 
52  BaseTKGroup();
54 
56  BaseTKGroup(const char* prefix,
57  const VectorSpace<V,M>& vectorSpace,
58  const std::vector<double>& scales);
60  virtual ~BaseTKGroup();
62 
64 
65  virtual bool symmetric () const = 0;
67 
69  virtual const GaussianVectorRV<V,M>& rv (unsigned int stageId ) = 0;
70 
72  virtual const GaussianVectorRV<V,M>& rv (const std::vector<unsigned int>& stageIds) = 0;
74 
76 
77  const BaseEnvironment& env() const;
79 
81  const V& preComputingPosition (unsigned int stageId) const;
82 
84  virtual bool setPreComputingPosition (const V& position, unsigned int stageId);
85 
87  virtual void clearPreComputingPositions();
89 
91 
92 
94  virtual void print (std::ostream& os) const;
96 protected:
99  std::string m_prefix;
101  std::vector<double> m_scales;
102  std::vector<const V*> m_preComputingPositions;
103  std::vector<GaussianVectorRV<V,M>* > m_rvs; // Gaussian, not Base... And nothing const...
104 };
105 
106 } // End namespace QUESO
107 
108 #endif // UQ_TRANSITION_KERNEL_GROUP_H
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
Definition: TKGroup.C:121
virtual ~BaseTKGroup()
Destructor.
Definition: TKGroup.C:65
A class representing a vector space.
Definition: VectorSet.h:46
std::vector< const V * > m_preComputingPositions
Definition: TKGroup.h:102
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
BaseTKGroup()
Default constructor.
Definition: TKGroup.C:33
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:102
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
Definition: TKGroup.C:135
std::vector< GaussianVectorRV< V, M > * > m_rvs
Definition: TKGroup.h:103
const VectorSpace< V, M > * m_vectorSpace
Definition: TKGroup.h:100
This class sets up the environment underlying the use of the QUESO library by an executable.
Definition: Environment.h:396
This base class allows the representation of a transition kernel.
Definition: TKGroup.h:48
virtual const GaussianVectorRV< V, M > & rv(unsigned int stageId)=0
Gaussian increment property to construct a transition kernel. See template specialization.
virtual bool symmetric() const =0
Whether or not the matrix is symmetric. See template specialization.
A class representing a Gaussian vector RV.
const EmptyEnvironment * m_emptyEnv
Definition: TKGroup.h:97
const BaseEnvironment & env() const
QUESO&#39;s environment.
Definition: TKGroup.C:78
std::vector< double > m_scales
Definition: TKGroup.h:101
std::string m_prefix
Definition: TKGroup.h:99
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
Definition: TKGroup.C:85
const BaseEnvironment & m_env
Definition: TKGroup.h:98

Generated on Thu Apr 23 2015 19:18:34 for queso-0.50.1 by  doxygen 1.8.5