queso-0.53.0
InterpolationSurrogateDataSet.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_INTERPOLATION_SURROGATE_DATA_SET_H
26 #define UQ_INTERPOLATION_SURROGATE_DATA_SET_H
27 
28 #include <queso/InterpolationSurrogateData.h>
29 
30 namespace QUESO
31 {
32  class GslVector;
33  class GslMatrix;
34 
36 
40  template<class V = GslVector, class M = GslMatrix>
42  {
43  public:
44 
46  const std::vector<unsigned int>& n_points,
47  unsigned int n_datasets );
48 
50 
51  const InterpolationSurrogateData<V,M>& get_dataset( unsigned int s ) const;
52 
54 
55  unsigned int size() const
56  { return m_datasets.size(); }
57 
58  private:
59 
61 
63  std::vector<InterpolationSurrogateData<V,M>*> m_datasets;
64 
65  };
66 
67  template<class V, class M>
68  inline
70  {
71  queso_require_less( s, m_datasets.size() );
72  queso_assert( m_datasets[s] );
73 
74  return *(m_datasets[s]);
75  }
76 
77  template<class V, class M>
78  inline
80  {
81  queso_require_less( s, m_datasets.size() );
82  queso_assert( m_datasets[s] );
83 
84  return *(m_datasets[s]);
85  }
86 
87 } // end namespace QUESO
88 
89 #endif // UQ_INTERPOLATION_SURROGATE_DATA_SET_H
#define queso_assert(asserted)
Definition: asserts.h:146
Container class for multiple, consistent InterpolationSurrogateData objects.
const InterpolationSurrogateData< V, M > & get_dataset(unsigned int s) const
std::vector< InterpolationSurrogateData< V, M > * > m_datasets
Data structure to hold all data sets.
Class representing a subset of a vector space shaped like a hypercube.
Definition: BoxSubset.h:44
#define queso_require_less(expr1, expr2)
Definition: asserts.h:133

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