queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::SequentialVectorRealizer< V, M > Class Template Reference

A class for handling sequential draws (sampling) from probability density distributions. More...

#include <SequentialVectorRealizer.h>

Inheritance diagram for QUESO::SequentialVectorRealizer< V, M >:
QUESO::BaseVectorRealizer< V, M >

Public Member Functions

Constructor/Destructor methods

Default constructor.

 SequentialVectorRealizer (const char *prefix, const BaseVectorSequence< V, M > &chain)
 
 ~SequentialVectorRealizer ()
 Destructor. More...
 
Sampling-related methods

Returns the unified mean vector; access to private attribute m_unifiedSampleExpVector.

const V & unifiedSampleExpVector () const
 
const V & unifiedSampleVarVector () const
 Returns the unified variance vector; access to private attribute m_unifiedSampleVarVector. More...
 
void realization (V &nextValues) const
 Draws the next value from this chain (m_chain) and saves it in nextValues. More...
 
- Public Member Functions inherited from QUESO::BaseVectorRealizer< V, M >
 BaseVectorRealizer (const char *prefix, const VectorSet< V, M > &unifiedImageSet, unsigned int subPeriod)
 Default constructor. More...
 
virtual ~BaseVectorRealizer ()
 Virtual destructor. More...
 
const VectorSet< V, M > & unifiedImageSet () const
 Image set where the realizations lie. Access to protected attribute m_unifiedImageSet. More...
 
unsigned int subPeriod () const
 Sub-period of the realization. Access to protected attribute m_subPeriod. More...
 

Private Attributes

const BaseVectorSequence< V, M > & m_chain
 
unsigned int m_currentChainPos
 
V * m_unifiedSampleExpVector
 
V * m_unifiedSampleVarVector
 

Additional Inherited Members

- Protected Attributes inherited from QUESO::BaseVectorRealizer< V, M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< V, M > & m_unifiedImageSet
 
unsigned int m_subPeriod
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::SequentialVectorRealizer< V, M >

A class for handling sequential draws (sampling) from probability density distributions.

This class handles sequential sampling (it returns the next value of the chain) from a probability density distribution.

Definition at line 46 of file SequentialVectorRealizer.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::SequentialVectorRealizer< V, M >::SequentialVectorRealizer ( const char *  prefix,
const BaseVectorSequence< V, M > &  chain 
)

Definition at line 33 of file SequentialVectorRealizer.C.

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

36  :
37  BaseVectorRealizer<V,M>(((std::string)(prefix)+"seq").c_str(),chain.unifiedBoxPlain(),chain.subSequenceSize()),
38  m_chain (chain),
40  m_unifiedSampleExpVector(new V(chain.unifiedMeanPlain() )), // IMPORTANT
41  m_unifiedSampleVarVector(new V(chain.unifiedSampleVariancePlain())) // IMPORTANT
42 {
43  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 0)) {
44  *m_env.subDisplayFile() << "In SequentialVectorRealizer<V,M>::constructor()"
45  << ": m_chain.subSequenceSize() = " << m_chain.subSequenceSize()
46  << std::endl;
47  }
48 }
const BaseVectorSequence< V, M > & m_chain
const BaseEnvironment & m_env
unsigned int displayVerbosity() const
Definition: Environment.C:450
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
template<class V , class M >
QUESO::SequentialVectorRealizer< V, M >::~SequentialVectorRealizer ( )

Member Function Documentation

template<class V , class M >
void QUESO::SequentialVectorRealizer< V, M >::realization ( V &  nextValues) const
virtual

Draws the next value from this chain (m_chain) and saves it in nextValues.

Implements QUESO::BaseVectorRealizer< V, M >.

Definition at line 59 of file SequentialVectorRealizer.C.

60 {
61  m_chain.getPositionValues(m_currentChainPos++,nextParamValues);
63 
64  return;
65 }
const BaseVectorSequence< V, M > & m_chain
template<class V , class M >
const V & QUESO::SequentialVectorRealizer< V, M >::unifiedSampleExpVector ( ) const

Definition at line 69 of file SequentialVectorRealizer.C.

template<class V , class M >
const V & QUESO::SequentialVectorRealizer< V, M >::unifiedSampleVarVector ( ) const

Returns the unified variance vector; access to private attribute m_unifiedSampleVarVector.

Definition at line 76 of file SequentialVectorRealizer.C.

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const BaseVectorSequence<V,M>& QUESO::SequentialVectorRealizer< V, M >::m_chain
private
template<class V = GslVector, class M = GslMatrix>
unsigned int QUESO::SequentialVectorRealizer< V, M >::m_currentChainPos
mutableprivate

Definition at line 71 of file SequentialVectorRealizer.h.

template<class V = GslVector, class M = GslMatrix>
V* QUESO::SequentialVectorRealizer< V, M >::m_unifiedSampleExpVector
private

Definition at line 72 of file SequentialVectorRealizer.h.

template<class V = GslVector, class M = GslMatrix>
V* QUESO::SequentialVectorRealizer< V, M >::m_unifiedSampleVarVector
private

Definition at line 73 of file SequentialVectorRealizer.h.


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

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