queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::BaseVectorCdf< V, M > Class Template Referenceabstract

A templated (base) class for handling CDFs of vector functions. More...

#include <VectorCdf.h>

Inheritance diagram for QUESO::BaseVectorCdf< V, M >:
QUESO::GaussianVectorCdf< V, M > QUESO::GenericVectorCdf< V, M > QUESO::SampledVectorCdf< V, M >

Public Member Functions

Constructor/Destructor methods
 BaseVectorCdf (const char *prefix, const VectorSet< V, M > &pdfSupport)
 Default constructor. More...
 
virtual ~BaseVectorCdf ()
 Virtual destructor. More...
 
Mathematical methods
const VectorSet< V, M > & pdfSupport () const
 Returns the image set (support) of the PDF; access to protected attribute m_pdfSupport. More...
 
virtual void values (const V &paramValues, V &cdfVec) const =0
 Finds the value of the vector CDF at each element of paramValue, and saves it in cdfVec. See template specialization. More...
 
virtual const BaseScalarCdf
< double > & 
cdf (unsigned int rowId) const =0
 

Protected Attributes

const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< V, M > & m_pdfSupport
 

I/O methods

virtual void print (std::ostream &os) const =0
 Prints the vector CDF. See template specialization. More...
 
virtual 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...
 
std::ostream & operator<< (std::ostream &os, const BaseVectorCdf< V, M > &obj)
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::BaseVectorCdf< V, M >

A templated (base) class for handling CDFs of vector functions.

In many applications is necessary to consider the properties of two or more RVs simultaneously (represented within QUESO as Random Vectors, via BaseVectorRV and derived classes). When dealing simultaneously with more than one RV, ie, a vector RV, the joint cumulative distribution function must also be defined. This class handles the CDFs of vector RV, which are referred to as multivariate/vector/joint CDFs.

Definition at line 53 of file VectorCdf.h.

Constructor & Destructor Documentation

template<class V, class M>
QUESO::BaseVectorCdf< V, M >::BaseVectorCdf ( const char *  prefix,
const VectorSet< V, M > &  pdfSupport 
)

Default constructor.

Instantiates an object of the class given a prefix and the support (image set) of the PDF that is related to this CDF (recall that the CDF of a continuous RV is the integral of the PDF of that RV).

Definition at line 31 of file VectorCdf.C.

References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseVectorCdf< V, M >::m_env, QUESO::BaseVectorCdf< V, M >::m_prefix, and QUESO::BaseEnvironment::subDisplayFile().

34  :
35  m_env (pdfSupport.env()),
36  m_prefix ((std::string)(prefix)+"Cdf_"),
38 {
39  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
40  *m_env.subDisplayFile() << "Entering BaseVectorCdf<V,M>::constructor()"
41  << ": prefix = " << m_prefix
42  << std::endl;
43  }
44 
45  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 5)) {
46  *m_env.subDisplayFile() << "Leaving BaseVectorCdf<V,M>::constructor()"
47  << ": prefix = " << m_prefix
48  << std::endl;
49  }
50 }
std::string m_prefix
Definition: VectorCdf.h:99
const VectorSet< V, M > & m_pdfSupport
Definition: VectorCdf.h:100
const BaseEnvironment & m_env
Definition: VectorCdf.h:98
const VectorSet< V, M > & pdfSupport() const
Returns the image set (support) of the PDF; access to protected attribute m_pdfSupport.
Definition: VectorCdf.C:59
unsigned int displayVerbosity() const
Definition: Environment.C:450
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
template<class V , class M >
QUESO::BaseVectorCdf< V, M >::~BaseVectorCdf ( )
virtual

Virtual destructor.

Definition at line 53 of file VectorCdf.C.

54 {
55 }

Member Function Documentation

template<class V = GslVector, class M = GslMatrix>
virtual const BaseScalarCdf<double>& QUESO::BaseVectorCdf< V, M >::cdf ( unsigned int  rowId) const
pure virtual
template<class V , class M >
const VectorSet< V, M > & QUESO::BaseVectorCdf< V, M >::pdfSupport ( ) const

Returns the image set (support) of the PDF; access to protected attribute m_pdfSupport.

Definition at line 59 of file VectorCdf.C.

Referenced by QUESO::horizontalDistances().

60 {
61  return m_pdfSupport;
62 }
const VectorSet< V, M > & m_pdfSupport
Definition: VectorCdf.h:100
template<class V = GslVector, class M = GslMatrix>
virtual void QUESO::BaseVectorCdf< V, M >::print ( std::ostream &  os) const
pure virtual

Prints the vector CDF. See template specialization.

Implemented in QUESO::GaussianVectorCdf< V, M >, QUESO::SampledVectorCdf< V, M >, and QUESO::GenericVectorCdf< V, M >.

template<class V , class M >
void QUESO::BaseVectorCdf< V, M >::subWriteContents ( const std::string &  varNamePrefix,
const std::string &  fileName,
const std::string &  fileType,
const std::set< unsigned int > &  allowedSubEnvIds 
) const
virtual

Writes the CDF of an allowed sub-environment to a file.

This function does nothing and should
not be called by the user.

Reimplemented in QUESO::SampledVectorCdf< V, M >.

Definition at line 66 of file VectorCdf.C.

71 {
72  std::cerr << "WARNING: BaseVectorCdf<V,M>::subWriteContents() being used..."
73  << std::endl;
74  return;
75 }
template<class V = GslVector, class M = GslMatrix>
virtual void QUESO::BaseVectorCdf< V, M >::values ( const V &  paramValues,
V &  cdfVec 
) const
pure virtual

Finds the value of the vector CDF at each element of paramValue, and saves it in cdfVec. See template specialization.

Implemented in QUESO::GaussianVectorCdf< V, M >, QUESO::SampledVectorCdf< V, M >, and QUESO::GenericVectorCdf< V, M >.

Friends And Related Function Documentation

template<class V = GslVector, class M = GslMatrix>
std::ostream& operator<< ( std::ostream &  os,
const BaseVectorCdf< V, M > &  obj 
)
friend

Definition at line 83 of file VectorCdf.h.

84  {
85  obj.print(os);
86  return os;
87  }

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const BaseEnvironment& QUESO::BaseVectorCdf< V, M >::m_env
protected
template<class V = GslVector, class M = GslMatrix>
const VectorSet<V,M>& QUESO::BaseVectorCdf< V, M >::m_pdfSupport
protected

Definition at line 100 of file VectorCdf.h.


The documentation for this class was generated from the following files:

Generated on Tue Jun 5 2018 19:49:38 for queso-0.57.1 by  doxygen 1.8.5