queso-0.56.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;
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);
97 
99 
100 
102  virtual void print (std::ostream& os) const;
104 protected:
107  std::string m_prefix;
109  std::vector<double> m_scales;
110  std::vector<const V*> m_preComputingPositions;
111  std::vector<BaseVectorRV<V,M>* > m_rvs; // Gaussian, not Base... And nothing const...
112  unsigned int m_stageId;
113 };
114 
115 } // End namespace QUESO
116 
117 #endif // UQ_TRANSITION_KERNEL_GROUP_H
virtual ~BaseTKGroup()
Destructor.
Definition: TKGroup.C:67
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
Definition: TKGroup.C:87
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
Definition: TKGroup.C:111
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:197
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
Definition: TKGroup.C:133
std::vector< const V * > m_preComputingPositions
Definition: TKGroup.h:110
BaseTKGroup()
Default constructor.
Definition: TKGroup.C:33
virtual unsigned int set_dr_stage(unsigned int stageId)
Does nothing. Subclasses may re-implement. Returns the current stage id.
Definition: TKGroup.C:125
std::vector< BaseVectorRV< V, M > * > m_rvs
Definition: TKGroup.h:111
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
virtual bool symmetric() const =0
Whether or not the matrix is symmetric. See template specialization.
const VectorSpace< V, M > * m_vectorSpace
Definition: TKGroup.h:108
const EmptyEnvironment * m_emptyEnv
Definition: TKGroup.h:105
const BaseEnvironment & env() const
QUESO&#39;s environment.
Definition: TKGroup.C:80
This class sets up the environment underlying the use of the QUESO library by an executable.
Definition: Environment.h:411
std::string m_prefix
Definition: TKGroup.h:107
const BaseEnvironment & m_env
Definition: TKGroup.h:106
virtual const BaseVectorRV< V, M > & rv(unsigned int stageId) const =0
Gaussian increment property to construct a transition kernel. See template specialization.
unsigned int m_stageId
Definition: TKGroup.h:112
std::vector< double > m_scales
Definition: TKGroup.h:109

Generated on Tue Nov 29 2016 10:53:11 for queso-0.56.0 by  doxygen 1.8.5