25 #include <queso/SampledVectorCdf.h>
30 template<
class V,
class M>
37 m_cdfs(m_pdfSupport.vectorSpace().map(),1)
46 for (
unsigned int i = 0; i < (
unsigned int)
m_cdfs.MyLength(); ++i) {
47 sprintf(strI,
"%u_",i);
49 ((std::string)(
m_prefix)+strI).c_str(),
61 template<
class V,
class M>
64 for (
unsigned int i = 0; i < (
unsigned int) m_cdfs.MyLength(); ++i) {
65 if (m_cdfs(i,0))
delete m_cdfs(i,0);
69 template<
class V,
class M>
79 template<
class V,
class M>
86 return *(tmp->m_cdfs(rowId,0));
90 template <
class V,
class M>
95 for (
unsigned int i = 0; i < (
unsigned int) m_cdfs.MyLength(); ++i) {
103 template<
class V,
class M>
106 const std::string& varNamePrefix,
107 const std::string& fileName,
108 const std::string& fileType,
109 const std::set<unsigned int>& allowedSubEnvIds)
const
115 for (
unsigned int i = 0; i < (
unsigned int) m_cdfs.MyLength(); ++i) {
116 sprintf(compId,
"%d",i);
117 tmp->m_cdfs(i,0)->subWriteContents(varNamePrefix+
"comp"+compId,fileName,fileType,allowedSubEnvIds);
Class to accommodate arrays of one-dimensional grid.
unsigned int displayVerbosity() const
A templated (base) class for handling CDFs.
const BaseScalarCdf< double > & cdf(unsigned int rowId) const
Returns a scalar CDF stored at row rowId of the vector CDF.
DistArray< SampledScalarCdf< double > * > m_cdfs
void print(std::ostream &os) const
Prints the vector CDF (values of the grid points and of the CDF at such grid points).
A templated (base) class for handling CDFs of vector functions.
#define queso_error_msg(msg)
A class for handling sampled vector CDFs.
void values(const V ¶mValues, V &cdfVec) const
TODO: Returns the values of the vector CDF at each element of paramValues.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
#define queso_require_less_msg(expr1, expr2, msg)
const BaseOneDGrid< double > & grid(unsigned int rowId) const
Returns the grid stored in the rowId-th position of the array of grids.
Class to accommodate arrays of one-dimensional tables.
const std::vector< double > & oneDTable(unsigned int rowId) const
Returns the array located at position rowId of the one-dimensional table.
~SampledVectorCdf()
Destructor.
const BaseEnvironment & m_env
#define queso_require_greater_equal_msg(expr1, expr2, msg)
A class for handling sampled CDFs.
void subWriteContents(const std::string &varNamePrefix, const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds) const
Writes the CDF of an allowed sub-environment to a file.
SampledVectorCdf(const char *prefix, const ArrayOfOneDGrids< V, M > &oneDGrids, const ArrayOfOneDTables< V, M > &cdfValues)
Default constructor.