25 #include <queso/TKGroup.h>
26 #include <queso/GslVector.h>
27 #include <queso/GslMatrix.h>
32 template<
class V,
class M>
40 m_preComputingPositions(),
46 template<
class V,
class M>
50 const std::vector<double>& scales)
53 m_env (vectorSpace.env()),
55 m_vectorSpace (&vectorSpace),
56 m_scales (scales.
size(),1.),
57 m_preComputingPositions(scales.
size()+1,NULL),
58 m_rvs (scales.
size(),NULL),
61 for (
unsigned int i = 0; i <
m_scales.size(); ++i) {
66 template<
class V,
class M>
69 for (
unsigned int i = 0; i < m_rvs.size(); ++i) {
70 if (m_rvs[i])
delete m_rvs[i];
72 for (
unsigned int i = 0; i < m_preComputingPositions.size(); ++i) {
73 if (m_preComputingPositions[i])
delete m_preComputingPositions[i];
75 if (m_emptyEnv)
delete m_emptyEnv;
78 template<
class V,
class M>
85 template<
class V,
class M>
89 queso_require_greater_msg(m_preComputingPositions.size(), stageId,
"m_preComputingPositions.size() <= stageId");
91 queso_require_msg(m_preComputingPositions[stageId],
"m_preComputingPositions[stageId] == NULL");
93 return *m_preComputingPositions[stageId];
96 template<
class V,
class M>
100 queso_require_greater_msg(m_preComputingPositions.size(), stageId,
"m_preComputingPositions.size() <= stageId");
102 queso_require_msg(!(m_preComputingPositions[stageId]),
"m_preComputingPositions[stageId] != NULL");
104 m_preComputingPositions[stageId] =
new V(position);
109 template<
class V,
class M>
113 for (
unsigned int i = 0; i < m_preComputingPositions.size(); ++i) {
114 if (m_preComputingPositions[i]) {
115 delete m_preComputingPositions[i];
116 m_preComputingPositions[i] = NULL;
123 template <
class V,
class M>
127 return this->m_stageId;
131 template<
class V,
class M>
135 os <<
"In BaseTKGroup<V,M>::print()"
136 <<
": nothing to be printed" << std::endl;
const BaseEnvironment & env() const
QUESO's environment.
A class representing a vector space.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
virtual void print(std::ostream &os) const
TODO: Prints the transition kernel.
virtual void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
This class sets up the environment underlying the use of the QUESO library by an executable.
virtual ~BaseTKGroup()
Destructor.
const V & preComputingPosition(unsigned int stageId) const
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
BaseTKGroup()
Default constructor.
std::vector< double > m_scales
virtual unsigned int set_dr_stage(unsigned int stageId)
Does nothing. Subclasses may re-implement. Returns the current stage id.
virtual bool setPreComputingPosition(const V &position, unsigned int stageId)
Sets the pre-computing positions m_preComputingPositions[stageId] with a new vector of size position...