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)),
 
   52                       "WignerJointPdf<V,M>::constructor()",
 
   62 template<
class V,
class M>
 
   68 template<
class V, 
class M>
 
   71   const V& domainVector,
 
   72   const V* domainDirection,
 
   75         V* hessianEffect)
 const 
   79                       "WignerJointPdf<V,M>::actualValue()",
 
   82   if (gradVector   ) *gradVector     = m_domainSet.vectorSpace().zeroVector();
 
   83   if (hessianMatrix) *hessianMatrix *= 0.;
 
   84   if (hessianEffect) *hessianEffect  = m_domainSet.vectorSpace().zeroVector();
 
   86   double returnValue = 0.;
 
   87   double distanceRatio = (domainVector - *m_centerPos).norm2()/m_radius;
 
   88   if (distanceRatio < 1.) {
 
   89     returnValue = 2.*m_radius*m_radius*sqrt(1. - distanceRatio*distanceRatio)/M_PI;
 
   91   returnValue *= exp(m_logOfNormalizationFactor); 
 
   96 template<
class V, 
class M>
 
   99   const V& domainVector,
 
  100   const V* domainDirection,
 
  103         V* hessianEffect)
 const 
  105   if (gradVector   ) *gradVector     = m_domainSet.vectorSpace().zeroVector();
 
  106   if (hessianMatrix) *hessianMatrix *= 0.;
 
  107   if (hessianEffect) *hessianEffect  = m_domainSet.vectorSpace().zeroVector();
 
  110   return log(this->actualValue(domainVector,domainDirection,gradVector,hessianMatrix,hessianEffect));
 
  113 template<
class V, 
class M>
 
  119   if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 2)) {
 
  120     *m_env.subDisplayFile() << 
"Entering WignerJointPdf<V,M>::computeLogOfNormalizationFactor()" 
  124   if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 2)) {
 
  125     *m_env.subDisplayFile() << 
"Leaving WignerJointPdf<V,M>::computeLogOfNormalizationFactor()" 
  126                             << 
", m_logOfNormalizationFactor = " << m_logOfNormalizationFactor
 
double lnValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const 
Computes the logarithm of the value of the function. 
 
int worldRank() const 
Returns the process world rank. 
 
A templated class for handling sets. 
 
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 UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
 
double computeLogOfNormalizationFactor(unsigned int numSamples, bool updateFactorInternally) const 
Computes the logarithm of the normalization factor. 
 
A class for handling Wigner joint PDFs. 
 
A templated (base) class for handling joint PDFs. 
 
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 
 
double actualValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const 
Actual value of the PDF (scalar function). 
 
const BaseEnvironment & m_env