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 queso_require_msg(m_preComputingPositions[stageId],
"m_preComputingPositions[stageId] == NULL");
91 return *m_preComputingPositions[stageId];
94 template<
class V,
class M>
100 queso_require_msg(!(m_preComputingPositions[stageId]),
"m_preComputingPositions[stageId] != NULL");
102 m_preComputingPositions[stageId] =
new V(position);
107 template<
class V,
class M>
111 for (
unsigned int i = 0; i < m_preComputingPositions.size(); ++i) {
112 if (m_preComputingPositions[i]) {
113 delete m_preComputingPositions[i];
114 m_preComputingPositions[i] = NULL;
121 template<
class V,
class M>
125 os <<
"In BaseTKGroup<V,M>::print()"
126 <<
": nothing to be printed" << std::endl;
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
This class sets up the environment underlying the use of the QUESO library by an executable.
This base class allows the representation of a transition kernel.
virtual ~BaseTKGroup()
Destructor.
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 void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
const BaseEnvironment & env() const
QUESO's environment.
#define queso_require_msg(asserted, msg)
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
BaseTKGroup()
Default constructor.
std::vector< double > m_scales
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
#define queso_require_greater_msg(expr1, expr2, msg)
A class representing a vector space.