queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
IntersectionSubset.C
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 #include <queso/VectorSpace.h>
26 #include <queso/VectorSet.h>
27 #include <queso/IntersectionSubset.h>
28 #include <queso/GslVector.h>
29 #include <queso/GslMatrix.h>
30 
31 namespace QUESO {
32 
33 // Default, shaped constructor
34 template<class V, class M>
36  const VectorSpace<V,M>& vectorSpace,
37  double volume,
38  const VectorSet<V,M>& set1,
39  const VectorSet<V,M>& set2)
40  : VectorSubset<V,M>(prefix,vectorSpace,volume),
41  m_set1(set1),
42  m_set2(set2)
43 {
44 }
45 
46 // Destructor
47 template<class V, class M>
49 {
50 }
51 
52 // Mathematical methods
53 template<class V, class M>
54 bool IntersectionSubset<V,M>::contains(const V& vec) const
55 {
56  return (m_set1.contains(vec) && m_set2.contains(vec));
57 }
58 
59 template<class V, class M>
61 {
62  // No general way to do this?
63  queso_not_implemented();
64 }
65 
66 template<class V, class M>
68 {
69  // No general way to do this?
70  queso_not_implemented();
71 }
72 
73 // I/O methods
74 template <class V, class M>
75 void IntersectionSubset<V,M>::print(std::ostream& os) const
76 {
77  os << "In IntersectionSubset<V,M>::print()"
78  << ": m_set1 = " << m_set1
79  << ", m_set2 = " << m_set2
80  << std::endl;
81 
82  return;
83 }
84 
85 } // End namespace QUESO
86 
87 
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
A templated class for handling subsets.
Definition: VectorSubset.h:46
A templated class for handling sets.
Definition: VectorSet.h:52
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.
void moments(M &mat) const
Returns the set moments of inertia in the matrix mat. Not implemented.

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