queso-0.53.0
VectorSet.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_VECTOR_SET_H
26 #define UQ_VECTOR_SET_H
27 
28 #include <queso/Environment.h>
29 #include <queso/Defines.h>
30 
31 namespace QUESO {
32 
33 class GslVector;
34 class GslMatrix;
35 
48 template <class V, class M>
50 
51 template <class V = GslVector, class M = GslMatrix>
52 class VectorSet
53 {
54 public:
56 
57 
59  VectorSet(const BaseEnvironment& env, const char* prefix, double volume);
60 
62  virtual ~VectorSet();
64 
66 
67  const BaseEnvironment& env () const;
69 
71  const std::string& prefix () const;
73 
75 
76  double volume () const;
78 
80  virtual const VectorSpace<V,M>& vectorSpace() const = 0;
81 
83  virtual bool contains (const V& vec) const = 0;
85 
87 
88  virtual void print (std::ostream& os) const;
90  friend std::ostream & operator<<(std::ostream & os,
91  const VectorSet<V, M> & obj) {
92  obj.print(os);
93  return os;
94  }
96 
97 protected:
99  std::string m_prefix;
100  double m_volume;
101 
102 private:
104 
105  VectorSet();
106 };
107 
108 } // End namespace QUESO
109 
110 #endif // UQ_VECTOR_SET_H
A templated class for handling sets.
Definition: VectorSet.h:52
VectorSet()
Default Constructor.
Definition: VectorSet.C:37
virtual bool contains(const V &vec) const =0
Checks whether a set contains vector vec. See template specialization.
virtual void print(std::ostream &os) const
Prints nothing.
Definition: VectorSet.C:98
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:91
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
const BaseEnvironment & env() const
Environment. Access to private attribute m_env.
Definition: VectorSet.C:78
virtual ~VectorSet()
Virtual destructor.
Definition: VectorSet.C:63
friend std::ostream & operator<<(std::ostream &os, const VectorSet< V, M > &obj)
Definition: VectorSet.h:90
std::string m_prefix
Definition: VectorSet.h:99
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
A class representing a vector space.
Definition: VectorSet.h:49
virtual const VectorSpace< V, M > & vectorSpace() const =0
Vector space to which this set belongs to. See template specialization.
const BaseEnvironment & m_env
Definition: VectorSet.h:98

Generated on Thu Jun 11 2015 13:52:31 for queso-0.53.0 by  doxygen 1.8.5