queso-0.53.0
|
A class for handling sampled CDFs. More...
#include <SampledScalarCdf.h>
Public Member Functions | |
Constructor/Destructor methods | |
SampledScalarCdf (const BaseEnvironment &env, const char *prefix, const BaseOneDGrid< T > &cdfGrid, const std::vector< double > &cdfValues) | |
Default constructor. More... | |
~SampledScalarCdf () | |
Destructor. More... | |
Mathematical methods | |
double | value (T paramValue) const |
Returns the value of the CDF at paramValue . More... | |
T | inverse (double cdfValue) const |
Returns the position of a given value of CDF. More... | |
void | getSupport (T &minHorizontal, T &maxHorizontal) const |
Returns the support (image) of the CDF between two horizontal values (domain). More... | |
I/O methods | |
void | print (std::ostream &os) const |
Prints the CDF (values of the grid points and of the CDF at such grid points). More... | |
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. More... | |
Public Member Functions inherited from QUESO::BaseScalarCdf< T > | |
BaseScalarCdf (const BaseEnvironment &env, const char *prefix) | |
Default constructor. More... | |
virtual | ~BaseScalarCdf () |
Virtual destructor. More... | |
const BaseEnvironment & | env () const |
Environment. Access to private attribute m_env. More... | |
const std::string & | prefix () const |
Access to private attribute m_prefix. More... | |
Protected Attributes | |
const BaseOneDGrid< T > & | m_cdfGrid |
const std::vector< double > & | m_cdfValues |
Protected Attributes inherited from QUESO::BaseScalarCdf< T > | |
const BaseEnvironment & | m_env |
std::string | m_prefix |
T | m_minHorizontal |
T | m_maxHorizontal |
A class for handling sampled CDFs.
This class implements a sampled cumulative distribution function (CDF), given the grid points where it will be sampled and its resulting values.
Definition at line 46 of file SampledScalarCdf.h.
QUESO::SampledScalarCdf< T >::SampledScalarCdf | ( | const BaseEnvironment & | env, |
const char * | prefix, | ||
const BaseOneDGrid< T > & | cdfGrid, | ||
const std::vector< double > & | cdfValues | ||
) |
Default constructor.
Instantiates an object of the class given a prefix, the environment, the grid points where it will be sampled/evaluated and its resulting values.
Definition at line 31 of file SampledScalarCdf.C.
References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseScalarCdf< T >::m_env, QUESO::BaseScalarCdf< T >::m_prefix, and QUESO::BaseEnvironment::subDisplayFile().
QUESO::SampledScalarCdf< T >::~SampledScalarCdf | ( | ) |
|
virtual |
Returns the support (image) of the CDF between two horizontal values (domain).
Implements QUESO::BaseScalarCdf< T >.
Definition at line 153 of file SampledScalarCdf.C.
References queso_require_equal_to_msg, queso_require_msg, and queso_require_not_equal_to_msg.
|
virtual |
Returns the position of a given value of CDF.
Implements QUESO::BaseScalarCdf< T >.
Definition at line 102 of file SampledScalarCdf.C.
References k, queso_error_msg, and queso_require_msg.
|
virtual |
Prints the CDF (values of the grid points and of the CDF at such grid points).
Implements QUESO::BaseScalarCdf< T >.
Definition at line 194 of file SampledScalarCdf.C.
|
virtual |
Writes the CDF of an allowed sub-environment to a file.
It will write the data in Octave/Matlab compatible format.
Reimplemented from QUESO::BaseScalarCdf< T >.
Definition at line 216 of file SampledScalarCdf.C.
References QUESO::FilePtrSetStruct::ofsVar, and queso_require_greater_equal_msg.
|
virtual |
Returns the value of the CDF at paramValue
.
Implements QUESO::BaseScalarCdf< T >.
Definition at line 66 of file SampledScalarCdf.C.
References queso_require_greater_equal_msg, and queso_require_less_msg.
|
protected |
Definition at line 92 of file SampledScalarCdf.h.
|
protected |
Definition at line 93 of file SampledScalarCdf.h.