queso-0.51.1
DiscreteSubset.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,2009,2010,2011,2012,2013 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/DiscreteSubset.h>
27 
28 namespace QUESO {
29 
30 // Default constructor
31 template<class V, class M>
33  const VectorSpace<V,M>& vectorSpace,
34  const std::vector<V*>& elements)
35  : VectorSubset<V,M>(prefix, vectorSpace, 0.),
36  m_elements(elements.size(),NULL)
37 {
38  m_volume = 0.;
40  m_env.worldRank(),
41  "DiscreteSubset<V,M>::contains()",
42  "incomplete code");
43 }
44 
45 // Destructor
46 template<class V, class M>
48 {
49 }
50 
51 // Mathematical methods
52 template<class V, class M>
53 bool DiscreteSubset<V,M>::contains(const V& vec) const
54 {
56  m_env.worldRank(),
57  "DiscreteSubset<V,M>::contains()",
58  "incomplete code");
59 
60  return false;
61 }
62 
63 // I/O methods
64 template <class V, class M>
65 void DiscreteSubset<V,M>::print(std::ostream& os) const
66 {
67  os << "In DiscreteSubset<V,M>::print()"
68  << ": nothing to print"
69  << std::endl;
70 
71  return;
72 }
73 
74 } // End namespace QUESO
DiscreteSubset(const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< V * > &elements)
Default Constructor.
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
bool contains(const V &vec) const
Checks whether this discrete subset contains vector vec. TODO: incomplete code.
A templated class for handling subsets.
Definition: VectorSubset.h:44
const BaseEnvironment & m_env
Definition: VectorSet.h:99
void print(std::ostream &os) const
Prints nothing.
~DiscreteSubset()
Destructor.
A class representing a vector space.
Definition: VectorSet.h:46
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:223

Generated on Thu Apr 23 2015 19:26:14 for queso-0.51.1 by  doxygen 1.8.5