queso-0.56.1
BoxSubset.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_BOX_SUBSET_H
26 #define UQ_BOX_SUBSET_H
27 
28 #include <queso/VectorSpace.h>
29 #include <queso/VectorSubset.h>
30 
31 namespace QUESO {
32 
33 class GslVector;
34 class GslMatrix;
35 
43 template <class V = GslVector, class M = GslMatrix>
44 class BoxSubset : public VectorSubset<V,M> {
45 public:
47 
48 
50 
53  BoxSubset(const char* prefix,
55  const V& minValues,
56  const V& maxValues);
57 
59  ~BoxSubset();
61 
63 
64 
67  bool contains (const V& vec) const;
68 
70  void centroid (V& vec) const;
71 
73  void moments (M & mat) const;
74 
76  const V& minValues() const;
77 
79  const V& maxValues() const;
81 
83  void print (std::ostream& os) const;
84 
85 protected:
90 
93 
96 };
97 
98 } // End namespace QUESO
99 
100 #endif // UQ_BOX_SUBSET_H
A class representing a vector space.
Definition: VectorSet.h:49
~BoxSubset()
Destructor.
Definition: BoxSubset.C:56
void centroid(V &vec) const
Returns the centroid of this box subset in the vector vec.
Definition: BoxSubset.C:73
Class representing a subset of a vector space shaped like a hypercube.
Definition: BoxSubset.h:44
bool contains(const V &vec) const
Checks whether this box subset contains vector vec.
Definition: BoxSubset.C:62
A templated class for handling sets.
Definition: VectorSet.h:52
V m_maxValues
Vector of templated type V to store the maximum values of the box subset class.
Definition: BoxSubset.h:95
BoxSubset(const char *prefix, const VectorSpace< V, M > &vectorSpace, const V &minValues, const V &maxValues)
Shaped, default constructor.
Definition: BoxSubset.C:34
void print(std::ostream &os) const
Prints the volume, the minimum and the maximum values of this.
Definition: BoxSubset.C:108
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
void moments(M &mat) const
Returns the moments of inertia of this box subset in the matrix mat.
Definition: BoxSubset.C:83
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
const V & minValues() const
Vector of the minimum values of the box subset.
Definition: BoxSubset.C:95
V m_minValues
Vector of templated type V to store the minimum values of the box subset class.
Definition: BoxSubset.h:92
A templated class for handling subsets.
Definition: VectorSubset.h:46
const V & maxValues() const
Vector of the maximum values of the box subset.
Definition: BoxSubset.C:101

Generated on Thu Dec 15 2016 13:23:09 for queso-0.56.1 by  doxygen 1.8.5