queso-0.53.0
UniformVectorRV.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #include <queso/UniformVectorRV.h>
26 #include <queso/UniformJointPdf.h>
27 #include <queso/UniformVectorRealizer.h>
28 #include <queso/GslVector.h>
29 #include <queso/GslMatrix.h>
30 
31 namespace QUESO {
32 
33 // Default constructor-------------------------------
34 template<class V, class M>
36  const char* prefix,
37  const VectorSet<V,M>& imageSet)
38  :
39  BaseVectorRV<V,M>(((std::string)(prefix)+"uni").c_str(),imageSet)
40 {
41  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
42  *m_env.subDisplayFile() << "Entering UniformVectorRV<V,M>::constructor()"
43  << ": prefix = " << m_prefix
44  << std::endl;
45  }
46 
47  m_pdf = new UniformJointPdf<V,M>(m_prefix.c_str(),
48  m_imageSet);
50  m_imageSet);
51  m_subCdf = NULL; // FIX ME: complete code
52  m_unifiedCdf = NULL; // FIX ME: complete code
53  m_mdf = NULL; // FIX ME: complete code
54 
55  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
56  *m_env.subDisplayFile() << "Leaving UniformVectorRV<V,M>::constructor()"
57  << ": prefix = " << m_prefix
58  << std::endl;
59  }
60 }
61 // Destructor ---------------------------------------
62 template<class V, class M>
64 {
65  delete m_mdf;
66  delete m_unifiedCdf;
67  delete m_subCdf;
68  delete m_realizer;
69  delete m_pdf;
70 }
71 // I/O methods --------------------------------------
72 template <class V, class M>
73 void
74 UniformVectorRV<V,M>::print(std::ostream& os) const
75 {
76  os << "UniformVectorRV<V,M>::print() says, 'Please implement me.'" << std::endl;
77  return;
78 }
79 
80 } // End namespace QUESO
81 
unsigned int displayVerbosity() const
Definition: Environment.C:396
A class representing a uniform vector RV.
A templated class for handling sets.
Definition: VectorSet.h:52
const VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:117
A templated base class for handling vector RV.
Definition: VectorRV.h:54
A class for handling sampling from a Uniform probability density distribution.
A class for handling uniform joint PDFs.
virtual ~UniformVectorRV()
Virtual destructor.
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:118
std::string m_prefix
Definition: VectorRV.h:116
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:121
UniformVectorRV(const char *prefix, const VectorSet< V, M > &imageSet)
Default constructor.
const BaseEnvironment & m_env
Definition: VectorRV.h:115
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:122
void print(std::ostream &os) const
TODO: Prints the vector RV.
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:120
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:119

Generated on Thu Jun 11 2015 13:52:33 for queso-0.53.0 by  doxygen 1.8.5