25 #include <queso/GcmTotalInfo.h>
26 #include <queso/GslVector.h>
27 #include <queso/GslMatrix.h>
31 template <
class S_V,
class S_M,
class D_V,
class D_M,
class P_V,
class P_M,
class Q_V,
class Q_M>
36 m_numConstituents (4),
37 m_constitutiveDomains (m_numConstituents,(const
VectorSet <P_V,P_M>*) NULL),
38 m_constitutivePriorRvs(m_numConstituents,(const
BaseVectorRV<P_V,P_M>*) NULL),
39 m_totalDim (initializeTotalDim(s)),
40 m_totalSpace (m_env,
"total_",m_totalDim,NULL),
41 m_totalDomainVolume (1.),
42 m_totalDomain (
"total_",m_totalSpace,m_totalDomainVolume,m_constitutiveDomains),
43 m_totalPriorRv (
"total_prior_",m_constitutivePriorRvs,m_totalDomain),
44 m_totalPostRv (
"total_post_",m_totalSpace),
45 m_like_previousTotal (m_totalSpace.zeroVector()),
46 m_totalPostMean (m_totalSpace.zeroVector()),
47 m_totalPostMedian (m_totalSpace.zeroVector()),
48 m_totalPostMode (m_totalSpace.zeroVector()),
49 m_totalPostMaxLnValue (-INFINITY),
50 m_totalMLE (m_totalSpace.zeroVector()),
51 m_totalLikeMaxLnValue (-INFINITY),
52 m_solutionDomain (NULL),
54 m_solutionRealizer (NULL),
55 m_mhSeqGenerator (NULL),
60 *
m_env.
subDisplayFile() <<
"Entering GcmTotalInfo<S_V,S_M,D_V,D_M,P_V,P_M,Q_V,Q_M>::constructor(1)"
67 *
m_env.
subDisplayFile() <<
"Leaving GcmTotalInfo<S_V,S_M,D_V,D_M,P_V,P_M,Q_V,Q_M>::constructor(1)"
72 template <
class S_V,
class S_M,
class D_V,
class D_M,
class P_V,
class P_M,
class Q_V,
class Q_M>
78 m_numConstituents (8),
79 m_constitutiveDomains (m_numConstituents,(const
VectorSet<P_V,P_M>*) NULL),
80 m_constitutivePriorRvs(m_numConstituents,(const
BaseVectorRV<P_V,P_M>*) NULL),
81 m_totalDim (initializeTotalDim(s,e)),
82 m_totalSpace (m_env,
"total_", m_totalDim, NULL),
83 m_totalDomainVolume (1.),
84 m_totalDomain (
"total_",m_totalSpace,m_totalDomainVolume,m_constitutiveDomains),
85 m_totalPriorRv (
"total_prior_",m_constitutivePriorRvs,m_totalDomain),
86 m_totalPostRv (
"total_post_",m_totalSpace),
87 m_like_previousTotal (m_totalSpace.zeroVector()),
88 m_totalPostMean (m_totalSpace.zeroVector()),
89 m_totalPostMedian (m_totalSpace.zeroVector()),
90 m_totalPostMode (m_totalSpace.zeroVector()),
91 m_totalPostMaxLnValue (-INFINITY),
92 m_totalMLE (m_totalSpace.zeroVector()),
93 m_totalLikeMaxLnValue (-INFINITY),
94 m_solutionDomain (NULL),
96 m_solutionRealizer (NULL),
97 m_mhSeqGenerator (NULL),
102 *
m_env.
subDisplayFile() <<
"Entering GcmTotalInfo<S_V,S_M,D_V,D_M,P_V,P_M,Q_V,Q_M>::constructor(2)"
109 *
m_env.
subDisplayFile() <<
"Leaving GcmTotalInfo<S_V,S_M,D_V,D_M,P_V,P_M,Q_V,Q_M>::constructor(2)"
114 template <
class S_V,
class S_M,
class D_V,
class D_M,
class P_V,
class P_M,
class Q_V,
class Q_M>
121 if (m_mlSampler )
delete m_mlSampler;
122 if (m_mhSeqGenerator )
delete m_mhSeqGenerator;
123 if (m_solutionRealizer)
delete m_solutionRealizer;
124 if (m_solutionPdf )
delete m_solutionPdf;
125 if (m_solutionDomain )
delete m_solutionDomain;
128 template <
class S_V,
class S_M,
class D_V,
class D_M,
class P_V,
class P_M,
class Q_V,
class Q_M>
130 GcmTotalInfo<S_V,S_M,D_V,D_M,P_V,P_M,Q_V,Q_M>::initializeTotalDim(
const GcmSimulationInfo<S_V,S_M,P_V,P_M,Q_V,Q_M>& s)
146 template <
class S_V,
class S_M,
class D_V,
class D_M,
class P_V,
class P_M,
class Q_V,
class Q_M>
173 template <
class S_V,
class S_M,
class D_V,
class D_M,
class P_V,
class P_M,
class Q_V,
class Q_M>
177 m_totalPriorRv.pdf().setNormalizationStyle(0);
178 for (
unsigned int i = 0; i < m_numConstituents; ++i) {
179 m_totalDomainVolume *= m_constitutiveDomains[i]->volume();
185 if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 2)) {
186 *m_env.subDisplayFile() <<
"In GcmTotalInfo<S_V,S_M,D_V,D_M,P_V,P_M,Q_V,Q_M>::commonConstructor()"
187 <<
"\n m_totalDim = " << m_totalDim
188 <<
"\n m_numConstituents = " << m_numConstituents
189 <<
"\n m_totalDomainVolume = " << m_totalDomainVolume
unsigned int displayVerbosity() const
unsigned int m_4lambdaSDim
BoxSubset< P_V, P_M > m_5lambdaYDomain
A templated class for handling sets.
BoxSubset< P_V, P_M > m_2lambdaWDomain
const BaseEnvironment & m_env
BoxSubset< P_V, P_M > m_7rhoVDomain
A templated base class for handling vector RV.
unsigned int m_2lambdaWDim
BetaVectorRV< P_V, P_M > m_3rhoWPriorRv
BoxSubset< P_V, P_M > m_3rhoWDomain
unsigned int initializeTotalDim(const GcmSimulationInfo< S_V, S_M, P_V, P_M, Q_V, Q_M > &s)
BoxSubset< P_V, P_M > m_4lambdaSDomain
BetaVectorRV< P_V, P_M > m_7rhoVPriorRv
GammaVectorRV< P_V, P_M > m_1lambdaEtaPriorRv
GammaVectorRV< P_V, P_M > m_4lambdaSPriorRv
unsigned int m_5lambdaYDim
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
GammaVectorRV< P_V, P_M > m_6lambdaVPriorRv
unsigned int m_6lambdaVDim
const BaseVectorRV< P_V, P_M > & m_8thetaPriorRv
GcmTotalInfo(const GcmSimulationInfo< S_V, S_M, P_V, P_M, Q_V, Q_M > &s)
BoxSubset< P_V, P_M > m_6lambdaVDomain
unsigned int m_1lambdaEtaDim
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
GammaVectorRV< P_V, P_M > m_5lambdaYPriorRv
GammaVectorRV< P_V, P_M > m_2lambdaWPriorRv
BoxSubset< P_V, P_M > m_1lambdaEtaDomain