26 #include <queso/JeffreysVectorRealizer.h>
27 #include <queso/GslVector.h>
28 #include <queso/GslMatrix.h>
33 template<
class V,
class M>
38 BaseVectorRealizer<V,M>(((std::string)(prefix)+
"gen").c_str(),unifiedImageSet,std::numeric_limits<unsigned int>::max())
53 template<
class V,
class M>
58 template<
class V,
class M>
64 if (imageBox == NULL) {
65 queso_error_msg(
"For JeffreysVectorRealizer<V,M>::realization(), only box images are supported right now");
69 for (
unsigned int i = 0; i < logMinValues.sizeLocal(); ++i) {
70 if (logMinValues[i] < 0.0) {
71 queso_error_msg(
"The minimum value for a Jeffreys distribution should be greater than or equal to zero.");
74 logMinValues[i] = std::log(logMinValues[i]);
79 for (
unsigned int i = 0; i < logMaxValues.sizeLocal(); ++i) {
80 if (logMaxValues[i] <= 0.0) {
81 queso_error_msg(
"The maximum value for a Jeffreys distribution should be greater than zero.");
84 logMaxValues[i] = std::log(logMaxValues[i]);
88 nextValues.cwSetUniform(logMinValues,logMaxValues);
89 for (
unsigned int i = 0; i < nextValues.sizeLocal(); ++i) {
90 nextValues[i] = std::exp(nextValues[i]);
unsigned int displayVerbosity() const
A templated class for handling sets.
A class for handling sampling from a jeffreys probability density distribution.
#define queso_error_msg(msg)
const BaseEnvironment & m_env
JeffreysVectorRealizer(const char *prefix, const VectorSet< V, M > &unifiedImageSet)
Constructor.
const V & maxValues() const
Vector of the maximum values of the box subset.
Class for vector operations using GSL library.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
A templated (base) class for handling sampling from vector RVs.
const V & minValues() const
Vector of the minimum values of the box subset.
Class representing a subset of a vector space shaped like a hypercube.
void realization(V &nextValues) const
Draws a realization.
~JeffreysVectorRealizer()
Destructor.