queso-0.52.0
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-2015 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 //*****************************************************
35 // Base class
36 //*****************************************************
48 template<class V, class M>
49 class BaseTKGroup {
50 public:
52 
53  BaseTKGroup();
55 
57  BaseTKGroup(const char* prefix,
58  const VectorSpace<V,M>& vectorSpace,
59  const std::vector<double>& scales);
61  virtual ~BaseTKGroup();
63 
65 
66  virtual bool symmetric () const = 0;
68 
70  virtual const BaseVectorRV<V,M>& rv (unsigned int stageId ) const = 0;
71 
73  virtual const BaseVectorRV<V,M>& rv (const std::vector<unsigned int>& stageIds) = 0;
75 
77 
78  const BaseEnvironment& env() const;
80 
82  const V& preComputingPosition (unsigned int stageId) const;
83 
85  virtual bool setPreComputingPosition (const V& position, unsigned int stageId);
86 
88  virtual void clearPreComputingPositions();
90 
92 
93 
95  virtual void print (std::ostream& os) const;
97 protected:
100  std::string m_prefix;
102  std::vector<double> m_scales;
103  std::vector<const V*> m_preComputingPositions;
104  std::vector<BaseVectorRV<V,M>* > m_rvs; // Gaussian, not Base... And nothing const...
105 };
106 
107 } // End namespace QUESO
108 
109 #endif // UQ_TRANSITION_KERNEL_GROUP_H
std::vector< double > m_scales
Definition: TKGroup.h:102
This base class allows the representation of a transition kernel.
Definition: TKGroup.h:49
const BaseEnvironment & m_env
Definition: TKGroup.h:99
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
Definition: TKGroup.C:121
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
Definition: TKGroup.C:135
const BaseEnvironment & env() const
QUESO&#39;s environment.
Definition: TKGroup.C:78
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
const VectorSpace< V, M > * m_vectorSpace
Definition: TKGroup.h:101
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
Definition: TKGroup.C:85
virtual const BaseVectorRV< V, M > & rv(unsigned int stageId) const =0
Gaussian increment property to construct a transition kernel. See template specialization.
BaseTKGroup()
Default constructor.
Definition: TKGroup.C:33
A templated base class for handling vector RV.
Definition: VectorRV.h:51
const EmptyEnvironment * m_emptyEnv
Definition: TKGroup.h:98
std::string m_prefix
Definition: TKGroup.h:100
A class representing a vector space.
Definition: VectorSet.h:46
std::vector< const V * > m_preComputingPositions
Definition: TKGroup.h:103
virtual bool symmetric() const =0
Whether or not the matrix is symmetric. See template specialization.
This class sets up the environment underlying the use of the QUESO library by an executable.
Definition: Environment.h:396
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 ~BaseTKGroup()
Destructor.
Definition: TKGroup.C:65
std::vector< BaseVectorRV< V, M > * > m_rvs
Definition: TKGroup.h:104

Generated on Thu Apr 23 2015 19:30:54 for queso-0.52.0 by  doxygen 1.8.5