queso-0.53.0
Protected Attributes | List of all members
QUESO::DiscreteSubset< V, M > Class Template Reference

A templated class representing the discrete vector subsets. More...

#include <DiscreteSubset.h>

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

Public Member Functions

Constructor/Destructor methods.
 DiscreteSubset (const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< V * > &elements)
 Default Constructor. More...
 
 ~DiscreteSubset ()
 Destructor. More...
 
Mathematical methods.
bool contains (const V &vec) const
 Checks whether this discrete subset contains vector vec. TODO: incomplete code. More...
 
I/O methods.
void print (std::ostream &os) const
 Prints nothing. More...
 
- Public Member Functions inherited from QUESO::VectorSubset< V, M >
 VectorSubset ()
 Default Constructor. More...
 
 VectorSubset (const char *prefix, const VectorSpace< V, M > &vectorSpace, double volume)
 Shaped constructor (with volume). More...
 
virtual ~VectorSubset ()
 Destructor. More...
 
const VectorSpace< V, M > & vectorSpace () const
 Vector space to which this set belongs to. See template specialization. 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...
 

Protected Attributes

std::vector< V * > m_elements
 Number of elements in the discrete vector subset. More...
 
- Protected Attributes inherited from QUESO::VectorSubset< V, M >
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::DiscreteSubset< V, M >

A templated class representing the discrete vector subsets.

This class is used to represent the a discrete vector subset. Here the notion of volume does not apply, instead there is the total number of elements (vectors) that belongs to the subset.

Definition at line 45 of file DiscreteSubset.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::DiscreteSubset< V, M >::DiscreteSubset ( const char *  prefix,
const VectorSpace< V, M > &  vectorSpace,
const std::vector< V * > &  elements 
)

Default Constructor.

It constructs a class object given the prefix, vector space to which it belongs and its number of elements.

Definition at line 32 of file DiscreteSubset.C.

References QUESO::VectorSet< V, M >::m_volume, queso_deprecated, and queso_not_implemented.

35  : VectorSubset<V,M>(prefix, vectorSpace, 0.),
36  m_elements(elements.size(),NULL)
37 {
39 
40  m_volume = 0.;
42 }
#define queso_not_implemented()
Definition: asserts.h:56
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
#define queso_deprecated()
Definition: Defines.h:120
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
std::vector< V * > m_elements
Number of elements in the discrete vector subset.
template<class V , class M >
QUESO::DiscreteSubset< V, M >::~DiscreteSubset ( )

Destructor.

Definition at line 46 of file DiscreteSubset.C.

References queso_deprecated.

47 {
49 }
#define queso_deprecated()
Definition: Defines.h:120

Member Function Documentation

template<class V , class M >
bool QUESO::DiscreteSubset< V, M >::contains ( const V &  vec) const
virtual

Checks whether this discrete subset contains vector vec. TODO: incomplete code.

Implements QUESO::VectorSubset< V, M >.

Definition at line 53 of file DiscreteSubset.C.

References queso_deprecated, and queso_not_implemented.

54 {
57 }
#define queso_not_implemented()
Definition: asserts.h:56
#define queso_deprecated()
Definition: Defines.h:120
template<class V , class M >
void QUESO::DiscreteSubset< V, M >::print ( std::ostream &  os) const
virtual

Prints nothing.

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

Definition at line 61 of file DiscreteSubset.C.

References queso_deprecated.

62 {
64 
65  os << "In DiscreteSubset<V,M>::print()"
66  << ": nothing to print"
67  << std::endl;
68 
69  return;
70 }
#define queso_deprecated()
Definition: Defines.h:120

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
std::vector<V*> QUESO::DiscreteSubset< V, M >::m_elements
protected

Number of elements in the discrete vector subset.

Definition at line 77 of file DiscreteSubset.h.


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

Generated on Thu Jun 11 2015 13:52:33 for queso-0.53.0 by  doxygen 1.8.5