queso-0.50.1
WignerVectorRV.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,2009,2010,2011,2012,2013 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/WignerVectorRV.h>
26 #include <queso/GslVector.h>
27 #include <queso/GslMatrix.h>
28 
29 namespace QUESO {
30 
31 // Default constructor -----------------------------
32 template<class V, class M>
34  const char* prefix,
35  const VectorSet<V,M>& imageSet,
36  const V& centerPos,
37  double radius)
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 WignerVectorRV<V,M>::constructor()"
43  << ": prefix = " << m_prefix
44  << std::endl;
45  }
46 
47  UQ_FATAL_TEST_MACRO(radius <= 0.,
48  m_env.worldRank(),
49  "WignerVectorRV<V,M>::constructor()",
50  "invalid radius");
51 
52  m_pdf = new WignerJointPdf<V,M>(m_prefix.c_str(),
53  m_imageSet,
54  centerPos,
55  radius);
57  m_imageSet,
58  centerPos,
59  radius);
60  m_subCdf = NULL; // FIX ME: complete code
61  m_unifiedCdf = NULL; // FIX ME: complete code
62  m_mdf = NULL; // FIX ME: complete code
63 
64  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
65  *m_env.subDisplayFile() << "Leaving WignerVectorRV<V,M>::constructor()"
66  << ": prefix = " << m_prefix
67  << std::endl;
68  }
69 }
70 // Constructor -------------------------------------
71 template<class V, class M>
73 {
74  delete m_mdf;
75  delete m_unifiedCdf;
76  delete m_subCdf;
77  delete m_realizer;
78  delete m_pdf;
79 }
80 //--------------------------------------------------
81 template <class V, class M>
82 void
83 WignerVectorRV<V,M>::print(std::ostream& os) const
84 {
85  os << "WignerVectorRV<V,M>::print() says, 'Please implement me.'" << std::endl;
86  return;
87 }
88 
89 } // End namespace QUESO
90 
void print(std::ostream &os) const
TODO: Prints the vector RV.
const BaseVectorCdf< V, M > * m_unifiedCdf
Definition: VectorRV.h:136
A templated base class for handling vector RV.
Definition: VectorRV.h:69
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:305
A class for handling sampling from a Wigner probability density distribution.
const BaseEnvironment & m_env
Definition: VectorRV.h:130
virtual ~WignerVectorRV()
Virtual destructor.
const VectorSet< V, M > & m_imageSet
Definition: VectorRV.h:132
const BaseVectorCdf< V, M > * m_subCdf
Definition: VectorRV.h:135
A class for handling Wigner joint PDFs.
BaseVectorRealizer< V, M > * m_realizer
Definition: VectorRV.h:134
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:222
A templated class for handling sets.
Definition: VectorSet.h:49
const BaseVectorMdf< V, M > * m_mdf
Definition: VectorRV.h:137
WignerVectorRV(const char *prefix, const VectorSet< V, M > &imageSet, const V &centerPos, double radius)
Default Constructor.
std::string m_prefix
Definition: VectorRV.h:131
BaseJointPdf< V, M > * m_pdf
Definition: VectorRV.h:133
unsigned int displayVerbosity() const
Definition: Environment.C:436
A class representing a vector RV constructed via Wigner distribution.

Generated on Thu Apr 23 2015 19:18:35 for queso-0.50.1 by  doxygen 1.8.5