25 #include <queso/VectorSpace.h>
26 #include <queso/BoxSubset.h>
27 #include <queso/GslVector.h>
28 #include <queso/GslMatrix.h>
33 template<
class V,
class M>
39 m_minValues(minValues),
40 m_maxValues(maxValues)
44 "BoxSubset<V,M>::BoxSubset()",
45 "vectors 'minValues' and 'maxValues' should have the same size");
48 "BoxSubset<V,M>::BoxSubset()",
49 "sizes of vectors 'minValues' and 'maxValues' should be equal to dimension of the vector space");
50 for (
unsigned int i = 0; i <
m_vectorSpace->dimLocal(); ++i) {
53 "BoxSubset<V,M>::BoxSubset()",
54 "it should happen minValue <= maxValue for all dimensions");
58 for (
unsigned int i = 0; i <
m_vectorSpace->dimLocal(); ++i) {
64 template<
class V,
class M>
70 template<
class V,
class M>
76 return (!vec.atLeastOneComponentSmallerThan(m_minValues) &&
77 !vec.atLeastOneComponentBiggerThan (m_maxValues));
81 template<
class V,
class M>
87 template<
class V,
class M>
94 template <
class V,
class M>
97 os <<
"In BoxSubset<V,M>::print()"
98 <<
": m_minValues = " << m_minValues
99 <<
", m_maxValues = " << m_maxValues
100 <<
", m_volume = " << m_volume
V m_maxValues
Vector of templated type V to store the maximum values of the box subset class.
const V & maxValues() const
Vector of the maximum values of the box subset.
V m_minValues
Vector of templated type V to store the minimum values of the box subset class.
int worldRank() const
Returns the process world rank.
unsigned int dimLocal() const
const BaseEnvironment & m_env
const V & minValues() const
Vector of the minimum values of the box subset.
Class representing a subset of a vector space shaped like a hypercube.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
const VectorSpace< V, M > * m_vectorSpace
A templated class for handling subsets.
bool contains(const V &vec) const
Checks whether this box subset contains vector vec.
A class representing a vector space.
BoxSubset(const char *prefix, const VectorSpace< V, M > &vectorSpace, const V &minValues, const V &maxValues)
Shaped, default constructor.
void print(std::ostream &os) const
Prints the volume, the minimum and the maximum values of this.