queso-0.53.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 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;
76 
78 
79  const BaseEnvironment& env() const;
81 
83  const V& preComputingPosition (unsigned int stageId) const;
84 
86  virtual bool setPreComputingPosition (const V& position, unsigned int stageId);
87 
89  virtual void clearPreComputingPositions();
91 
93 
94 
96  virtual void print (std::ostream& os) const;
98 protected:
101  std::string m_prefix;
103  std::vector<double> m_scales;
104  std::vector<const V*> m_preComputingPositions;
105  std::vector<BaseVectorRV<V,M>* > m_rvs; // Gaussian, not Base... And nothing const...
106 };
107 
108 } // End namespace QUESO
109 
110 #endif // UQ_TRANSITION_KERNEL_GROUP_H
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
Definition: TKGroup.C:123
This class sets up the environment underlying the use of the QUESO library by an executable.
Definition: Environment.h:392
This base class allows the representation of a transition kernel.
Definition: TKGroup.h:50
A templated base class for handling vector RV.
Definition: VectorRV.h:54
virtual ~BaseTKGroup()
Destructor.
Definition: TKGroup.C:65
const EmptyEnvironment * m_emptyEnv
Definition: TKGroup.h:99
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:96
const VectorSpace< V, M > * m_vectorSpace
Definition: TKGroup.h:102
const BaseEnvironment & m_env
Definition: TKGroup.h:100
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
Definition: TKGroup.C:109
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:193
std::vector< const V * > m_preComputingPositions
Definition: TKGroup.h:104
virtual const BaseVectorRV< V, M > & rv(unsigned int stageId) const =0
Gaussian increment property to construct a transition kernel. See template specialization.
std::vector< BaseVectorRV< V, M > * > m_rvs
Definition: TKGroup.h:105
BaseTKGroup()
Default constructor.
Definition: TKGroup.C:33
std::vector< double > m_scales
Definition: TKGroup.h:103
std::string m_prefix
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
A class representing a vector space.
Definition: VectorSet.h:49
virtual bool symmetric() const =0
Whether or not the matrix is symmetric. See template specialization.

Generated on Thu Jun 11 2015 13:52:32 for queso-0.53.0 by  doxygen 1.8.5