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

A templated class representing the intersection of two vector sets. More...

#include <IntersectionSubset.h>

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

Public Member Functions

Constructor/Destructor methods.
 IntersectionSubset (const char *prefix, const VectorSpace< V, M > &vectorSpace, double volume, const VectorSet< V, M > &set1, const VectorSet< V, M > &set2)
 Default, shaped constructor. More...
 
 ~IntersectionSubset ()
 Destructor. More...
 
Mathematical methods.
bool contains (const V &vec) const
 Determines whether both sets m_set1 and m_set2 (class' private attributes) contain vector vec. More...
 
I/O methods.
void print (std::ostream &os) const
 Prints both subsets (via protected attributes m_set1 and m_set2). 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

const VectorSet< V, M > & m_set1
 Vector set: m_set1. More...
 
const VectorSet< V, M > & m_set2
 Vector set: m_set2. 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::IntersectionSubset< V, M >

A templated class representing the intersection of two vector sets.

This class is used to determine if a vector belongs to the intersection of two vector sets. It is useful for handling a posterior PDF, since its domain is the intersection of the domain of the prior PDF with the domain of the likelihood function.

Definition at line 45 of file IntersectionSubset.h.

Constructor & Destructor Documentation

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

Default, shaped constructor.

Creates the class for the intersection of two vector sets, given a vector space, its volume and the sets.

Definition at line 35 of file IntersectionSubset.C.

40  : VectorSubset<V,M>(prefix,vectorSpace,volume),
41  m_set1(set1),
42  m_set2(set2)
43 {
44 }
const VectorSet< V, M > & m_set1
Vector set: m_set1.
const VectorSet< V, M > & m_set2
Vector set: m_set2.
double volume() const
Set volume; access to private attribute m_volume.
Definition: VectorSet.C:91
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
template<class V , class M >
QUESO::IntersectionSubset< V, M >::~IntersectionSubset ( )

Destructor.

Definition at line 48 of file IntersectionSubset.C.

49 {
50 }

Member Function Documentation

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

Determines whether both sets m_set1 and m_set2 (class' private attributes) contain vector vec.

Implements QUESO::VectorSubset< V, M >.

Definition at line 54 of file IntersectionSubset.C.

55 {
56  return (m_set1.contains(vec) && m_set2.contains(vec));
57 }
const VectorSet< V, M > & m_set1
Vector set: m_set1.
const VectorSet< V, M > & m_set2
Vector set: m_set2.
template<class V , class M >
void QUESO::IntersectionSubset< V, M >::print ( std::ostream &  os) const
virtual

Prints both subsets (via protected attributes m_set1 and m_set2).

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

Definition at line 61 of file IntersectionSubset.C.

62 {
63  os << "In IntersectionSubset<V,M>::print()"
64  << ": m_set1 = " << m_set1
65  << ", m_set2 = " << m_set2
66  << std::endl;
67 
68  return;
69 }
const VectorSet< V, M > & m_set1
Vector set: m_set1.
const VectorSet< V, M > & m_set2
Vector set: m_set2.

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const VectorSet<V,M>& QUESO::IntersectionSubset< V, M >::m_set1
protected

Vector set: m_set1.

We seek the intersection of vectors set m_set1 and m_set2.

Definition at line 82 of file IntersectionSubset.h.

template<class V = GslVector, class M = GslMatrix>
const VectorSet<V,M>& QUESO::IntersectionSubset< V, M >::m_set2
protected

Vector set: m_set2.

Definition at line 85 of file IntersectionSubset.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