queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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 >:
QUESO::VectorSubset< V, M > QUESO::VectorSet< V, M >

Public Member Functions

void moments (M &mat) const
 Returns the set moments of inertia in the matrix mat. Not implemented. More...
 
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...
 
void centroid (V &vec) const
 Returns the set centroid in the vector vec. Not implemented. 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 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 VectorSet< V, M > & m_set2
Vector set: m_set2.
const VectorSet< V, M > & m_set1
Vector set: m_set1.
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
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 >
void QUESO::IntersectionSubset< V, M >::centroid ( V &  vec) const
virtual

Returns the set centroid in the vector vec. Not implemented.

Implements QUESO::VectorSet< V, M >.

Definition at line 60 of file IntersectionSubset.C.

61 {
62  // No general way to do this?
63  queso_not_implemented();
64 }
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_set2
Vector set: m_set2.
const VectorSet< V, M > & m_set1
Vector set: m_set1.
template<class V , class M >
void QUESO::IntersectionSubset< V, M >::moments ( M &  mat) const
virtual

Returns the set moments of inertia in the matrix mat. Not implemented.

Implements QUESO::VectorSet< V, M >.

Definition at line 67 of file IntersectionSubset.C.

68 {
69  // No general way to do this?
70  queso_not_implemented();
71 }
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 75 of file IntersectionSubset.C.

76 {
77  os << "In IntersectionSubset<V,M>::print()"
78  << ": m_set1 = " << m_set1
79  << ", m_set2 = " << m_set2
80  << std::endl;
81 
82  return;
83 }
const VectorSet< V, M > & m_set2
Vector set: m_set2.
const VectorSet< V, M > & m_set1
Vector set: m_set1.

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 89 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 92 of file IntersectionSubset.h.


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

Generated on Tue Jun 5 2018 19:49:00 for queso-0.57.1 by  doxygen 1.8.5