queso-0.52.0
DiscreteSubset.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_DISCRETE_SUBSET_H
26 #define UQ_DISCRETE_SUBSET_H
27 
28 #include <queso/VectorSpace.h>
29 #include <queso/VectorSubset.h>
30 
31 namespace QUESO {
32 
41 template<class V, class M>
42 class DiscreteSubset : public VectorSubset<V,M> {
43 public:
45 
46 
49  DiscreteSubset(const char* prefix,
51  const std::vector<V*>& elements);
55 
57 
58  bool contains (const V& vec) const;
61 
63 
64  void print (std::ostream& os) const;
67 protected:
72 
74  std::vector<V*> m_elements;
75 };
76 
77 } // End namespace QUESO
78 
79 #endif // UQ_DISCRETE_SUBSET_H
A templated class for handling sets.
Definition: VectorSet.h:49
void print(std::ostream &os) const
Prints nothing.
bool contains(const V &vec) const
Checks whether this discrete subset contains vector vec. TODO: incomplete code.
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:80
~DiscreteSubset()
Destructor.
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:88
A templated class representing the discrete vector subsets.
A templated class for handling subsets.
Definition: VectorSubset.h:44
std::vector< V * > m_elements
Number of elements in the discrete vector subset.
A class representing a vector space.
Definition: VectorSet.h:46
DiscreteSubset(const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< V * > &elements)
Default Constructor.

Generated on Thu Apr 23 2015 19:30:54 for queso-0.52.0 by  doxygen 1.8.5