queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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-2017 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
M * m_savedRvLawCovMatrix
Covariance matrix of the RV.
V * m_savedRvLawExpVector
Vector of the mean value of the RV.
A templated (base) class for handling scalar functions.
GaussianVectorRV< V, M > * m_savedRv
My RV.
VectorSpace< V, M > * m_savedRvImageSpace
Image set of the RV.
const BaseEnvironment & m_env
Environment.
void copy(const ScalarGaussianRandomField &src)
Copy method.
A class representing a vector space.
Definition: VectorSet.h:49
ScalarGaussianRandomField(const char *prefix, const VectorSet< V, M > &indexSet, const BaseScalarFunction< V, M > &meanFunction, const BaseScalarCovarianceFunction< V, M > &covarianceFunction)
Constructor.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
A class representing a Gaussian vector RV.
A templated class for handling sets.
Definition: VectorSet.h:52
A templated (base) class to accommodate scalar covariance functions (of random variables).
const BaseScalarCovarianceFunction< V, M > & covarianceFunction() const
Covariance function; access to protected attribute m_covarianceFunction.
const BaseScalarCovarianceFunction< V, M > & m_covarianceFunction
Covariance function.
const BaseScalarFunction< V, M > & m_meanFunction
Mean function.
const BaseScalarFunction< V, M > & meanFunction() const
Mean function; access to protected attribute m_meanFunction.
ScalarGaussianRandomField & operator=(const ScalarGaussianRandomField &rhs)
TODO: Assignment operator; it copies rhs to this.
std::vector< V * > m_savedPositions
Saved positions.
const VectorSet< V, M > & indexSet() const
Index set; access to protected attribute m_indexSet.
A class for handling scalar Gaussian random fields (GRF).
const VectorSet< V, M > & m_indexSet
Index set.
void sampleFunction(const std::vector< V * > &fieldPositions, V &sampleValues)
Function that samples from a Gaussian PDF.

Generated on Tue Jun 5 2018 19:48:55 for queso-0.57.1 by  doxygen 1.8.5