25 #include <queso/TKGroup.h>
26 #include <queso/GslVector.h>
27 #include <queso/GslMatrix.h>
32 template<
class V,
class M>
40 m_preComputingPositions(NULL),
45 template<
class V,
class M>
49 const std::vector<double>& scales)
52 m_env (vectorSpace.env()),
54 m_vectorSpace (&vectorSpace),
55 m_scales (scales.size(),1.),
56 m_preComputingPositions(scales.size()+1,NULL),
57 m_rvs (scales.size(),NULL)
59 for (
unsigned int i = 0; i <
m_scales.size(); ++i) {
64 template<
class V,
class M>
67 for (
unsigned int i = 0; i < m_rvs.size(); ++i) {
68 if (m_rvs[i])
delete m_rvs[i];
70 for (
unsigned int i = 0; i < m_preComputingPositions.size(); ++i) {
71 if (m_preComputingPositions[i])
delete m_preComputingPositions[i];
73 if (m_emptyEnv)
delete m_emptyEnv;
76 template<
class V,
class M>
83 template<
class V,
class M>
89 "BaseTKGroup<V,M>::preComputingPosition()",
90 "m_preComputingPositions.size() <= stageId");
94 "BaseTKGroup<V,M>::preComputingPosition()",
95 "m_preComputingPositions[stageId] == NULL");
97 return *m_preComputingPositions[stageId];
100 template<
class V,
class M>
106 "BaseTKGroup<V,M>::setPreComputingPosition()",
107 "m_preComputingPositions.size() <= stageId");
111 "BaseTKGroup<V,M>::setPreComputingPosition()",
112 "m_preComputingPositions[stageId] != NULL");
114 m_preComputingPositions[stageId] =
new V(position);
119 template<
class V,
class M>
123 for (
unsigned int i = 0; i < m_preComputingPositions.size(); ++i) {
124 if (m_preComputingPositions[i]) {
125 delete m_preComputingPositions[i];
126 m_preComputingPositions[i] = NULL;
133 template<
class V,
class M>
137 os <<
"In BaseTKGroup<V,M>::print()"
138 <<
": nothing to be printed" << std::endl;
std::vector< double > m_scales
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
const BaseEnvironment & env() const
QUESO's environment.
This class sets up the environment underlying the use of the QUESO library by an executable.
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
This base class allows the representation of a transition kernel.
BaseTKGroup()
Default constructor.
A class representing a vector space.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
virtual bool setPreComputingPosition(const V &position, unsigned int stageId)
Sets the pre-computing positions m_preComputingPositions[stageId] with a new vector of size position...
virtual ~BaseTKGroup()
Destructor.