queso-0.57.1
|
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::queso_require_equal_to_msg, and QUESO::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.
|
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.
|
virtual |
Returns the value of the CDF at paramValue
.
Implements QUESO::BaseScalarCdf< T >.
Definition at line 66 of file SampledScalarCdf.C.
|
protected |
Definition at line 92 of file SampledScalarCdf.h.
|
protected |
Definition at line 93 of file SampledScalarCdf.h.