queso-0.51.1
Protected Attributes | List of all members
QUESO::VectorSet< V, M > Class Template Referenceabstract

A templated class for handling sets. More...

#include <VectorSet.h>

Inheritance diagram for QUESO::VectorSet< V, M >:
Inheritance graph
[legend]
Collaboration diagram for QUESO::VectorSet< V, M >:
Collaboration graph
[legend]

Public Member Functions

Constructor/Destructor methods.
 VectorSet ()
 Default Constructor. More...
 
 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...
 

Protected Attributes

const BaseEnvironmentm_env
 
std::string m_prefix
 
double m_volume
 

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, class M>
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 49 of file VectorSet.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::VectorSet< V, M >::VectorSet ( )

Default Constructor.

It should not be used by the user.

Definition at line 37 of file VectorSet.C.

References QUESO::VectorSet< V, M >::m_env, UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().

38  : m_env(*(new EmptyEnvironment()))
39 {
41  m_env.worldRank(),
42  "VectorSet<V,M>::constructor(), default",
43  "should not be used by user");
44 }
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
const BaseEnvironment & m_env
Definition: VectorSet.h:99
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:223
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 48 of file VectorSet.C.

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

50  : m_env(env),
53 {
54  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
55  *m_env.subDisplayFile() << "Entering VectorSet<V,M>::constructor()"
56  << std::endl;
57  }
58 
59  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
60  *m_env.subDisplayFile() << "Leaving VectorSet<V,M>::constructor()"
61  << std::endl;
62  }
63 }
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:88
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:305
const BaseEnvironment & m_env
Definition: VectorSet.h:99
const BaseEnvironment & env() const
Environment. Access to private attribute m_env.
Definition: VectorSet.C:82
std::string m_prefix
Definition: VectorSet.h:100
unsigned int displayVerbosity() const
Definition: Environment.C:436
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:95
template<class V , class M >
QUESO::VectorSet< V, M >::~VectorSet ( )
virtual

Virtual destructor.

Definition at line 67 of file VectorSet.C.

68 {
69  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
70  *m_env.subDisplayFile() << "Entering VectorSet<V,M>::destructor()"
71  << std::endl;
72  }
73 
74  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
75  *m_env.subDisplayFile() << "Leaving VectorSet<V,M>::destructor()"
76  << std::endl;
77  }
78 }
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:305
const BaseEnvironment & m_env
Definition: VectorSet.h:99
unsigned int displayVerbosity() const
Definition: Environment.C:436

Member Function Documentation

template<class V, class M>
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 82 of file VectorSet.C.

Referenced by QUESO::InstantiateIntersection().

83 {
84  return m_env;
85 }
const BaseEnvironment & m_env
Definition: VectorSet.h:99
template<class V , class M >
const std::string & QUESO::VectorSet< V, M >::prefix ( ) const

Access to private attribute m_prefix.

Definition at line 88 of file VectorSet.C.

Referenced by QUESO::InstantiateIntersection().

89 {
90  return m_prefix;
91 }
std::string m_prefix
Definition: VectorSet.h:100
template<class V , class M >
void QUESO::VectorSet< V, M >::print ( std::ostream &  os) const
virtual
template<class V, class M>
virtual const VectorSpace<V,M>& QUESO::VectorSet< V, M >::vectorSpace ( ) const
pure virtual
template<class V , class M >
double QUESO::VectorSet< V, M >::volume ( ) const

Set volume; access to private attribute m_volume.

Definition at line 95 of file VectorSet.C.

96 {
97  return m_volume;
98 }

Friends And Related Function Documentation

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

Definition at line 91 of file VectorSet.h.

92  {
93  obj.print(os);
94  return os;
95  }

Member Data Documentation

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

Definition at line 100 of file VectorSet.h.

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

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

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

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