queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
ArrayOfOneDGrids.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_ARRAY_OF_ONE_D_GRIDS_H
26 #define UQ_ARRAY_OF_ONE_D_GRIDS_H
27 
28 #include <queso/OneDGrid.h>
29 #include <queso/VectorSpace.h>
30 
31 namespace QUESO {
32 
33 class GslVector;
34 class GslMatrix;
35 
46 template<class V = GslVector, class M = GslMatrix>
48 {
49 public:
51 
52  ArrayOfOneDGrids(const char* prefix, const VectorSpace<V,M>& rowSpace);
54 
58 
60 
61  const VectorSpace<V,M>& rowSpace () const;
63 
65  const V& sizes () const;
66 
68  const V& minPositions () const;
69 
71  const V& maxPositions () const;
73 
75 
76 // void setGrid (unsigned int rowId,
77 // BaseOneDGrid<double>& oneDGrid);
78 
80  void setUniformGrids(const V& sizesVec,
81  const V& minPositionsVec,
82  const V& maxPositionsVec);
84 
86 
87  const BaseOneDGrid<double>& grid (unsigned int rowId) const;
90 
92 
93  void print (std::ostream& os) const;
95  friend std::ostream& operator<< (std::ostream& os,
96  const ArrayOfOneDGrids<V,M>& obj)
97  {
98  obj.print(os);
99  return os;
100  }
102 
103 private:
105  std::string m_prefix;
108 
112 
113 };
114 
115 } // End namespace QUESO
116 
117 #endif // UQ_ARRAY_OF_ONE_D_GRIDS_H
Class to accommodate arrays of one-dimensional grid.
const BaseOneDGrid< double > & grid(unsigned int rowId) const
Returns the grid stored in the rowId-th position of the array of grids.
const V & maxPositions() const
Returns an array with the maximum position of each grid.
A class representing a vector space.
Definition: VectorSet.h:49
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
const VectorSpace< V, M > & rowSpace() const
Returns the (vector) space to which the row belongs to.
ArrayOfOneDGrids(const char *prefix, const VectorSpace< V, M > &rowSpace)
Default constructor.
DistArray< BaseOneDGrid< double > * > m_oneDGrids
void setUniformGrids(const V &sizesVec, const V &minPositionsVec, const V &maxPositionsVec)
Sets an array of uniform grids.
~ArrayOfOneDGrids()
Destructor.
Base class for accommodating one-dimensional grids.
Definition: OneDGrid.h:46
const V & minPositions() const
Returns an array with the minimum position of each grid.
const VectorSpace< V, M > & m_rowSpace
A class for partitioning vectors and matrices.
Definition: DistArray.h:56
const BaseEnvironment & m_env
friend std::ostream & operator<<(std::ostream &os, const ArrayOfOneDGrids< V, M > &obj)
const V & sizes() const
Returns an array with the sizes of the grids.
void print(std::ostream &os) const
Prints the values of the array of grids (points).

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