queso-0.53.0
Protected Attributes | Private Member Functions | 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 (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
 

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 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:91
const BaseEnvironment & env() const
Environment. Access to private attribute m_env.
Definition: VectorSet.C:78
std::string m_prefix
Definition: VectorSet.h:99
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
const BaseEnvironment & m_env
Definition: VectorSet.h:98
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 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
const BaseEnvironment & m_env
Definition: VectorSet.h:98
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:98

Member Function Documentation

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:98
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:99
template<class V , class M >
void QUESO::VectorSet< V, M >::print ( std::ostream &  os) const
virtual
template<class V = GslVector, class M = GslMatrix>
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 91 of file VectorSet.C.

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 90 of file VectorSet.h.

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

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 99 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 Thu Jun 11 2015 13:52:34 for queso-0.53.0 by  doxygen 1.8.5