25 #include <queso/WignerJointPdf.h> 
   26 #include <queso/GslVector.h> 
   27 #include <queso/GslMatrix.h> 
   32 template<
class V,
class M>
 
   41   m_centerPos(new V(centerPos)),
 
   59 template<
class V,
class M>
 
   65 template<
class V, 
class M>
 
   68   const V& domainVector,
 
   69   const V* domainDirection,
 
   72         V* hessianEffect)
 const 
   76   if (gradVector   ) *gradVector     = m_domainSet.vectorSpace().zeroVector();
 
   77   if (hessianMatrix) *hessianMatrix *= 0.;
 
   78   if (hessianEffect) *hessianEffect  = m_domainSet.vectorSpace().zeroVector();
 
   80   double returnValue = 0.;
 
   81   double distanceRatio = (domainVector - *m_centerPos).norm2()/m_radius;
 
   82   if (distanceRatio < 1.) {
 
   83     returnValue = 2.*m_radius*m_radius*sqrt(1. - distanceRatio*distanceRatio)/M_PI;
 
   85   returnValue *= exp(m_logOfNormalizationFactor); 
 
   90 template<
class V, 
class M>
 
   93   const V& domainVector,
 
   94   const V* domainDirection,
 
   97         V* hessianEffect)
 const 
   99   if (gradVector   ) *gradVector     = m_domainSet.vectorSpace().zeroVector();
 
  100   if (hessianMatrix) *hessianMatrix *= 0.;
 
  101   if (hessianEffect) *hessianEffect  = m_domainSet.vectorSpace().zeroVector();
 
  104   return log(this->actualValue(domainVector,domainDirection,gradVector,hessianMatrix,hessianEffect));
 
  107 template<
class V, 
class M>
 
  111   meanVector = *m_centerPos;
 
  115 template<
class V,
class M>
 
  124 template<
class V, 
class M>
 
  130   if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 2)) {
 
  131     *m_env.subDisplayFile() << 
"Entering WignerJointPdf<V,M>::computeLogOfNormalizationFactor()" 
  135   if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 2)) {
 
  136     *m_env.subDisplayFile() << 
"Leaving WignerJointPdf<V,M>::computeLogOfNormalizationFactor()" 
  137                             << 
", m_logOfNormalizationFactor = " << m_logOfNormalizationFactor
 
virtual void distributionMean(V &meanVector) const 
Mean value of the underlying random variable. 
 
std::ofstream * subDisplayFile() const 
Access function for m_subDisplayFile (displays file on stream). 
 
WignerJointPdf(const char *prefix, const VectorSet< V, M > &domainSet, const V ¢erPos, double radius)
Constructor. 
 
#define queso_require_equal_to_msg(expr1, expr2, msg)
 
A templated (base) class for handling joint PDFs. 
 
double lnValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const 
Computes the logarithm of the value of the function. 
 
A templated class for handling sets. 
 
#define queso_require_greater_msg(expr1, expr2, msg)
 
#define queso_not_implemented()
 
double actualValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const 
Actual value of the PDF (scalar function). 
 
double commonComputeLogOfNormalizationFactor(unsigned int numSamples, bool updateFactorInternally) const 
Common method (to the derived classes) to compute the logarithm of the normalization factor...
 
~WignerJointPdf()
Destructor. 
 
unsigned int displayVerbosity() const 
 
const BaseEnvironment & m_env
 
double computeLogOfNormalizationFactor(unsigned int numSamples, bool updateFactorInternally) const 
Computes the logarithm of the normalization factor. 
 
A class for handling Wigner joint PDFs. 
 
virtual void distributionVariance(M &covMatrix) const 
Covariance matrix of the underlying random variable.