queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
IntersectionSubset.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_INTERSECTION_SUBSET_H
26 #define UQ_INTERSECTION_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 
44 template <class V = GslVector, class M = GslMatrix>
45 class IntersectionSubset : public VectorSubset<V,M> {
46 public:
48 
49 
52  IntersectionSubset(const char* prefix,
54  double volume,
55  const VectorSet<V,M>& set1,
56  const VectorSet<V,M>& set2);
57 
61 
63 
64  bool contains(const V& vec) const;
66 
68  void centroid (V& vec) const;
70 
72  void moments (M& mat) const;
74 
76 
77  void print (std::ostream& os) const;
80 
81 protected:
86 
88 
90 
93 };
94 
95 } // End namespace QUESO
96 
97 #endif // UQ_INTERSECTION_SUBSET_H
void centroid(V &vec) const
Returns the set centroid in the vector vec. Not implemented.
IntersectionSubset(const char *prefix, const VectorSpace< V, M > &vectorSpace, double volume, const VectorSet< V, M > &set1, const VectorSet< V, M > &set2)
Default, shaped constructor.
A class representing a vector space.
Definition: VectorSet.h:49
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
A templated class for handling subsets.
Definition: VectorSubset.h:46
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:91
A templated class for handling sets.
Definition: VectorSet.h:52
const VectorSet< V, M > & m_set2
Vector set: m_set2.
void print(std::ostream &os) const
Prints both subsets (via protected attributes m_set1 and m_set2).
bool contains(const V &vec) const
Determines whether both sets m_set1 and m_set2 (class&#39; private attributes) contain vector vec...
A templated class representing the intersection of two vector sets.
const VectorSet< V, M > & m_set1
Vector set: m_set1.
void moments(M &mat) const
Returns the set moments of inertia in the matrix mat. Not implemented.
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68

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