queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::VectorSubset< V, M > Class Template Referenceabstract

A templated class for handling subsets. More...

#include <VectorSubset.h>

Inheritance diagram for QUESO::VectorSubset< V, M >:
QUESO::VectorSet< V, M > QUESO::BoxSubset< Q_V, Q_M > QUESO::BoxSubset< V, M > QUESO::ConcatenationSubset< V, M > QUESO::DiscreteSubset< V, M > QUESO::IntersectionSubset< V, M >

Public Member Functions

Constructor/Destructor methods.
 VectorSubset ()
 Default Constructor. More...
 
 VectorSubset (const char *prefix, const VectorSpace< V, M > &vectorSpace, double volume)
 Shaped constructor (with volume). More...
 
virtual ~VectorSubset ()
 Destructor. More...
 
Mathematical methods.
const VectorSpace< V, M > & vectorSpace () const
 Vector space to which this set belongs to. See template specialization. More...
 
virtual bool contains (const V &vec) const =0
 Returns whether this contains vector vec. See template specialization. More...
 
I/O methods.
virtual void print (std::ostream &os) const
 Prints nothing. More...
 
- Public Member Functions inherited from QUESO::VectorSet< V, M >
 VectorSet (const BaseEnvironment &env, const char *prefix, double volume)
 Shaped constructor. More...
 
virtual ~VectorSet ()
 Virtual destructor. More...
 
const BaseEnvironmentenv () const
 Environment. Access to private attribute m_env. More...
 
const std::string & prefix () const
 Access to private attribute m_prefix. More...
 
double volume () const
 Set volume; access to private attribute m_volume. More...
 
virtual void centroid (V &vec) const =0
 Returns the set centroid in the vector vec. See template specialization. More...
 
virtual void moments (M &mat) const =0
 Returns the set moments of inertia in the matrix mat. See template specialization. More...
 

Protected Attributes

const VectorSpace< V, M > * m_vectorSpace
 
- Protected Attributes inherited from QUESO::VectorSet< V, M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
double m_volume
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::VectorSubset< V, M >

A templated class for handling subsets.

This class specifies a subset. The most common example of a subset is a subset of a vector space, present, for instance, in the definition of a scalar function: \( \pi: B \subset R^n \rightarrow R \). \( B \) is a subset of the set \( R^n \), which is also a vector space.

Definition at line 46 of file VectorSubset.h.

Constructor & Destructor Documentation

template<class V = GslVector, class M = GslMatrix>
QUESO::VectorSubset< V, M >::VectorSubset ( )

Default Constructor.

It should not be used by the user.

template<class V, class M>
QUESO::VectorSubset< V, M >::VectorSubset ( const char *  prefix,
const VectorSpace< V, M > &  vectorSpace,
double  volume 
)

Shaped constructor (with volume).

Definition at line 34 of file VectorSubset.C.

References QUESO::BaseEnvironment::displayVerbosity(), QUESO::VectorSet< V, M >::m_env, and QUESO::BaseEnvironment::subDisplayFile().

37  : VectorSet<V,M>(vectorSpace.env(), prefix, volume),
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 }
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:91
const VectorSpace< V, M > * m_vectorSpace
Definition: VectorSubset.h:81
const BaseEnvironment & m_env
Definition: VectorSet.h:104
unsigned int displayVerbosity() const
Definition: Environment.C:450
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
template<class V , class M >
QUESO::VectorSubset< V, M >::~VectorSubset ( )
virtual

Destructor.

Definition at line 53 of file VectorSubset.C.

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 }
const BaseEnvironment & m_env
Definition: VectorSet.h:104
unsigned int displayVerbosity() const
Definition: Environment.C:450
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320

Member Function Documentation

template<class V = GslVector, class M = GslMatrix>
virtual bool QUESO::VectorSubset< V, M >::contains ( const V &  vec) const
pure virtual

Returns whether this contains vector vec. See template specialization.

Implements QUESO::VectorSet< V, M >.

Implemented in QUESO::ConcatenationSubset< V, M >, QUESO::BoxSubset< V, M >, QUESO::IntersectionSubset< V, M >, and QUESO::DiscreteSubset< V, M >.

template<class V , class M >
void QUESO::VectorSubset< V, M >::print ( std::ostream &  os) const
virtual

Prints nothing.

Reimplemented from QUESO::VectorSet< V, M >.

Reimplemented in QUESO::BoxSubset< V, M >, QUESO::BoxSubset< Q_V, Q_M >, QUESO::ConcatenationSubset< V, M >, QUESO::IntersectionSubset< V, M >, and QUESO::DiscreteSubset< V, M >.

Definition at line 75 of file VectorSubset.C.

76 {
77  os << "In VectorSubset<V,M>::print()"
78  << ": nothing to be printed" << std::endl;
79  return;
80 }
template<class V , class M >
const VectorSpace< V, M > & QUESO::VectorSubset< V, M >::vectorSpace ( ) const
virtual

Vector space to which this set belongs to. See template specialization.

Implements QUESO::VectorSet< V, M >.

Definition at line 68 of file VectorSubset.C.

Referenced by QUESO::InstantiateIntersection(), QUESO::MonteCarloQuadrature< V, M >::MonteCarloQuadrature(), and QUESO::TensorProductQuadrature< V, M >::TensorProductQuadrature().

69 {
70  return *m_vectorSpace;
71 }
const VectorSpace< V, M > * m_vectorSpace
Definition: VectorSubset.h:81

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const VectorSpace<V,M>* QUESO::VectorSubset< V, M >::m_vectorSpace
protected

Definition at line 81 of file VectorSubset.h.

Referenced by QUESO::BoxSubset< V, M >::BoxSubset().


The documentation for this class was generated from the following files:

Generated on Tue Jun 5 2018 19:49:03 for queso-0.57.1 by  doxygen 1.8.5