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

A templated class for handling sets. More...

#include <VectorSet.h>

Inheritance diagram for QUESO::VectorSet< V, M >:
QUESO::VectorSpace< V, M > QUESO::VectorSubset< V, M > QUESO::VectorSpace< P_V, P_M > QUESO::VectorSpace< Q_V, Q_M > QUESO::VectorSpace< QUESO::GslVector, QUESO::GslMatrix > QUESO::VectorSubset< Q_V, Q_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.
 VectorSet (const BaseEnvironment &env, const char *prefix, double volume)
 Shaped constructor. More...
 
virtual ~VectorSet ()
 Virtual destructor. More...
 
Environment methods
const BaseEnvironmentenv () const
 Environment. Access to private attribute m_env. More...
 
const std::string & prefix () const
 Access to private attribute m_prefix. More...
 
Mathematical methods.
double volume () const
 Set volume; access to private attribute m_volume. More...
 
virtual const VectorSpace< V, M > & vectorSpace () const =0
 Vector space to which this set belongs to. See template specialization. More...
 
virtual bool contains (const V &vec) const =0
 Checks whether a set contains vector vec. See template specialization. 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 BaseEnvironmentm_env
 
std::string m_prefix
 
double m_volume
 

Private Member Functions

 VectorSet ()
 Default Constructor. More...
 

I/O methods.

virtual void print (std::ostream &os) const
 Prints nothing. More...
 
std::ostream & operator<< (std::ostream &os, const VectorSet< V, M > &obj)
 

Detailed Description

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

A templated class for handling sets.

This class allows the mathematical definition of a scalar function such as: \( \pi: B \subset R^n \rightarrow R \), since it requires the specification of the domain \( B \), which is a subset of the vector space \( R^n \), which is itself a set.

Definition at line 52 of file VectorSet.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::VectorSet< V, M >::VectorSet ( const BaseEnvironment env,
const char *  prefix,
double  volume 
)

Shaped constructor.

Creates a vector set given an environment, a identifying prefix and a volume.

Definition at line 44 of file VectorSet.C.

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

46  : m_env(env),
49 {
50  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
51  *m_env.subDisplayFile() << "Entering VectorSet<V,M>::constructor()"
52  << std::endl;
53  }
54 
55  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
56  *m_env.subDisplayFile() << "Leaving VectorSet<V,M>::constructor()"
57  << std::endl;
58  }
59 }
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 BaseEnvironment & m_env
Definition: VectorSet.h:104
std::string m_prefix
Definition: VectorSet.h:105
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
const BaseEnvironment & env() const
Environment. Access to private attribute m_env.
Definition: VectorSet.C:78
template<class V , class M >
QUESO::VectorSet< V, M >::~VectorSet ( )
virtual

Virtual destructor.

Definition at line 63 of file VectorSet.C.

64 {
65  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
66  *m_env.subDisplayFile() << "Entering VectorSet<V,M>::destructor()"
67  << std::endl;
68  }
69 
70  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
71  *m_env.subDisplayFile() << "Leaving VectorSet<V,M>::destructor()"
72  << std::endl;
73  }
74 }
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
template<class V , class M >
QUESO::VectorSet< V, M >::VectorSet ( )
private

Default Constructor.

It should not be used by the user.

Definition at line 37 of file VectorSet.C.

38  : m_env(*(new EmptyEnvironment()))
39 {
40 }
const BaseEnvironment & m_env
Definition: VectorSet.h:104

Member Function Documentation

template<class V = GslVector, class M = GslMatrix>
virtual void QUESO::VectorSet< V, M >::centroid ( V &  vec) const
pure virtual

Returns the set centroid in the vector vec. See template specialization.

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

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

Environment. Access to private attribute m_env.

Definition at line 78 of file VectorSet.C.

79 {
80  return m_env;
81 }
const BaseEnvironment & m_env
Definition: VectorSet.h:104
template<class V = GslVector, class M = GslMatrix>
virtual void QUESO::VectorSet< V, M >::moments ( M &  mat) const
pure virtual

Returns the set moments of inertia in the matrix mat. See template specialization.

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

template<class V , class M >
const std::string & QUESO::VectorSet< V, M >::prefix ( ) const

Access to private attribute m_prefix.

Definition at line 84 of file VectorSet.C.

Referenced by QUESO::InstantiateIntersection().

85 {
86  return m_prefix;
87 }
std::string m_prefix
Definition: VectorSet.h:105
template<class V , class M >
void QUESO::VectorSet< V, M >::print ( std::ostream &  os) const
virtual
template<class V , class M >
double QUESO::VectorSet< V, M >::volume ( ) const

Set volume; access to private attribute m_volume.

Definition at line 91 of file VectorSet.C.

Referenced by QUESO::MonteCarloQuadrature< V, M >::MonteCarloQuadrature(), and QUESO::UniformVectorRealizer< V, M >::realization().

92 {
93  return m_volume;
94 }

Friends And Related Function Documentation

template<class V = GslVector, class M = GslMatrix>
std::ostream& operator<< ( std::ostream &  os,
const VectorSet< V, M > &  obj 
)
friend

Definition at line 96 of file VectorSet.h.

97  {
98  obj.print(os);
99  return os;
100  }

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const BaseEnvironment& QUESO::VectorSet< V, M >::m_env
protected
template<class V = GslVector, class M = GslMatrix>
std::string QUESO::VectorSet< V, M >::m_prefix
protected

Definition at line 105 of file VectorSet.h.

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

template<class V = GslVector, class M = GslMatrix>
double QUESO::VectorSet< V, M >::m_volume
protected

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