queso-0.53.0
ScalarGaussianRandomField.h
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 #ifndef UQ_SCALAR_GAUSSIAN_RANDOM_FIELD_H
26 #define UQ_SCALAR_GAUSSIAN_RANDOM_FIELD_H
27 
28 #include <queso/ScalarCovarianceFunction.h>
29 #include <queso/ScalarFunction.h>
30 #include <queso/GaussianVectorRV.h>
31 
32 namespace QUESO {
33 
34 class GslVector;
35 class GslMatrix;
36 
48 template <class V = GslVector, class M = GslMatrix>
50 {
51  public:
53 
54 
57  ScalarGaussianRandomField(const char* prefix,
58  const VectorSet<V,M>& indexSet,
61 
63 
65 
69 
71 
72 
76 
78 
79  const VectorSet<V,M>& indexSet () const;
81 
83  const BaseScalarFunction<V,M>& meanFunction () const;
84 
87 
89 
92  void sampleFunction(const std::vector<V*>& fieldPositions, V& sampleValues);
94 
95 protected:
97  void copy (const ScalarGaussianRandomField& src);
98 
101 
103  std::string m_prefix;
104 
107 
110 
113 
115  std::vector<V*> m_savedPositions;
116 
119 
122 
125 
128 };
129 
130 } // End namespace QUESO
131 
132 #endif // UQ_SCALAR_GAUSSIAN_RANDOM_FIELD_H
VectorSpace< V, M > * m_savedRvImageSpace
Image set of the RV.
A class for handling scalar Gaussian random fields (GRF).
A templated class for handling sets.
Definition: VectorSet.h:52
const BaseScalarCovarianceFunction< V, M > & covarianceFunction() const
Covariance function; access to protected attribute m_covarianceFunction.
void sampleFunction(const std::vector< V * > &fieldPositions, V &sampleValues)
Function that samples from a Gaussian PDF.
ScalarGaussianRandomField & operator=(const ScalarGaussianRandomField &rhs)
TODO: Assignment operator; it copies rhs to this.
M * m_savedRvLawCovMatrix
Covariance matrix of the RV.
V * m_savedRvLawExpVector
Vector of the mean value of the RV.
const BaseScalarCovarianceFunction< V, M > & m_covarianceFunction
Covariance function.
A templated (base) class for handling scalar functions.
const BaseScalarFunction< V, M > & meanFunction() const
Mean function; access to protected attribute m_meanFunction.
const BaseScalarFunction< V, M > & m_meanFunction
Mean function.
A class representing a Gaussian vector RV.
const VectorSet< V, M > & indexSet() const
Index set; access to protected attribute m_indexSet.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
void copy(const ScalarGaussianRandomField &src)
Copy method.
A templated (base) class to accommodate scalar covariance functions (of random variables).
GaussianVectorRV< V, M > * m_savedRv
My RV.
ScalarGaussianRandomField(const char *prefix, const VectorSet< V, M > &indexSet, const BaseScalarFunction< V, M > &meanFunction, const BaseScalarCovarianceFunction< V, M > &covarianceFunction)
Constructor.
A class representing a vector space.
Definition: VectorSet.h:49
const VectorSet< V, M > & m_indexSet
Index set.
std::vector< V * > m_savedPositions
Saved positions.
const BaseEnvironment & m_env
Environment.

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