queso-0.53.0
VectorSubset.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-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 #include <queso/VectorSubset.h>
26 #include <queso/VectorSpace.h>
27 #include <queso/GslVector.h>
28 #include <queso/GslMatrix.h>
29 
30 namespace QUESO {
31 
32 // Shaped constructor
33 template <class V, class M>
35  const VectorSpace<V,M>& vectorSpace,
36  double volume)
37  : VectorSet<V,M>(vectorSpace.env(), prefix, volume),
38  m_vectorSpace(&vectorSpace)
39 {
40  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
41  *m_env.subDisplayFile() << "Entering VectorSubset<V,M>::constructor()"
42  << std::endl;
43  }
44 
45  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
46  *m_env.subDisplayFile() << "Leaving VectorSubset<V,M>::constructor()"
47  << std::endl;
48  }
49 }
50 
51 // Destructor
52 template <class V, class M>
54 {
55  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
56  *m_env.subDisplayFile() << "Entering VectorSubset<V,M>::destructor()"
57  << std::endl;
58  }
59 
60  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
61  *m_env.subDisplayFile() << "Leaving VectorSubset<V,M>::destructor()"
62  << std::endl;
63  }
64 }
65 
66 // Math methods
67 template <class V, class M>
69 {
70  return *m_vectorSpace;
71 }
72 
73 // I/O methods
74 template <class V, class M>
75 void VectorSubset<V,M>::print(std::ostream& os) const
76 {
77  os << "In VectorSubset<V,M>::print()"
78  << ": nothing to be printed" << std::endl;
79  return;
80 }
81 
82 } // End namespace QUESO
83 
unsigned int displayVerbosity() const
Definition: Environment.C:396
A templated class for handling sets.
Definition: VectorSet.h:52
A templated class for handling subsets.
Definition: VectorSubset.h:46
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
virtual ~VectorSubset()
Destructor.
Definition: VectorSubset.C:53
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
virtual void print(std::ostream &os) const
Prints nothing.
Definition: VectorSubset.C:75
VectorSubset()
Default Constructor.
A class representing a vector space.
Definition: VectorSet.h:49
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