25 #include <queso/GammaVectorRealizer.h>
26 #include <queso/GslVector.h>
27 #include <queso/GslMatrix.h>
32 template<
class V,
class M>
39 BaseVectorRealizer<V,M>(((std::string)(prefix)+
"gen").c_str(),unifiedImageSet,std::numeric_limits<unsigned int>::max()),
56 template<
class V,
class M>
61 template<
class V,
class M>
70 double smallerOfMaxValues = imageBox->
maxValues().getMinValue();
71 double smallerOfMinValues = imageBox->
minValues().getMinValue();
74 if( smallerOfMinValues < 0 )
76 std::cerr <<
"In GammaVectorRealizer<V,M>::realization()\n"
77 <<
"Gamma distribution is only defined in (0, infinity).\n"
78 <<
"The data provided is: \n"
80 <<
"Sampling will not cover all interval.\n"
86 "GammaVectorRealizer<V,M>::realization()",
87 "invalid input: Gamma distribution is only defined in (0, infinity), and min(m_maxValues)<0. ");
99 bool outOfSupport =
true;
102 nextValues.cwSetGamma(m_a,m_b);
103 outOfSupport = !(this->m_unifiedImageSet.contains(nextValues));
105 }
while (outOfSupport);
A templated class for handling sets.
const V & minValues() const
Vector of the minimum values of the box subset.
GammaVectorRealizer(const char *prefix, const VectorSet< V, M > &unifiedImageSet, const V &a, const V &b)
Constructor.
A templated (base) class for handling sampling from vector RVs.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
~GammaVectorRealizer()
Destructor.
const V & maxValues() const
Vector of the maximum values of the box subset.
void realization(V &nextValues) const
Draws a realization.
const BaseEnvironment & m_env
A class for handling sampling from a Gamma probability density distribution.
Class representing a subset of a vector space shaped like a hypercube.
unsigned int displayVerbosity() const
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)