queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M > Class Template Reference

A class for generic covariance matrices. More...

#include <GenericMatrixCovarianceFunction.h>

Inheritance diagram for QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >:
QUESO::BaseMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >

Public Member Functions

Constructor/Destructor methods
 GenericMatrixCovarianceFunction (const char *prefix, const VectorSet< P_V, P_M > &basicDomainSet, const VectorSet< Q_V, Q_M > &imageSet, void(*covRoutinePtr)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix), const void *routinesDataPtr)
 Default constructor. More...
 
virtual ~GenericMatrixCovarianceFunction ()
 Virtual destructor. More...
 
- Public Member Functions inherited from QUESO::BaseMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >
 BaseMatrixCovarianceFunction (const char *prefix, const VectorSet< P_V, P_M > &basicDomainSet, const VectorSet< Q_V, Q_M > &imageSet)
 Default constructor. More...
 
virtual ~BaseMatrixCovarianceFunction ()
 Virtual destructor. More...
 
const VectorSet< P_V, P_M > & basicDomainSet () const
 Domain set; access to private attribute m_basicDomainSet. More...
 

Math methods

void(* m_covRoutinePtr )(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)
 
const void * m_routineDataPtr
 
void covMatrix (const P_V &positionVector1, const P_V &positionVector2, Q_M &imageMatrix) const
 Calculates the value of the generic covariance matrix. More...
 

Additional Inherited Members

- Protected Attributes inherited from QUESO::BaseMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< P_V, P_M > & m_basicDomainSet
 
const VectorSet< Q_V, Q_M > & m_imageSet
 

Detailed Description

template<class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
class QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >

A class for generic covariance matrices.

This class implements a generic covariance matrices by calling a routine (via pointer).

Definition at line 48 of file GenericMatrixCovarianceFunction.h.

Constructor & Destructor Documentation

template<class P_V , class P_M , class Q_V , class Q_M >
QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::GenericMatrixCovarianceFunction ( const char *  prefix,
const VectorSet< P_V, P_M > &  basicDomainSet,
const VectorSet< Q_V, Q_M > &  imageSet,
void(*)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)  covRoutinePtr,
const void *  routinesDataPtr 
)

Default constructor.

Instantiates an object of the class given a prefix, the domain set, the pointer to the routine.

Definition at line 32 of file GenericMatrixCovarianceFunction.C.

References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::m_env, QUESO::BaseMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::m_prefix, and QUESO::BaseEnvironment::subDisplayFile().

38  :
39  BaseMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>(prefix,basicDomainSet,imageSet),
40  m_covRoutinePtr (covRoutinePtr),
41  m_routineDataPtr (routinesDataPtr)
42 {
43  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
44  *m_env.subDisplayFile() << "Entering GenericMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>::constructor()"
45  << ": prefix = " << m_prefix
46  << std::endl;
47  }
48 
49  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
50  *m_env.subDisplayFile() << "Leaving GenericMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>::constructor()"
51  << ": prefix = " << m_prefix
52  << std::endl;
53  }
54 }
void(* m_covRoutinePtr)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)
const VectorSet< P_V, P_M > & basicDomainSet() const
Domain set; access to private attribute m_basicDomainSet.
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 P_V , class P_M , class Q_V , class Q_M >
QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::~GenericMatrixCovarianceFunction ( )
virtual

Virtual destructor.

Definition at line 57 of file GenericMatrixCovarianceFunction.C.

58 {
59  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
60  *m_env.subDisplayFile() << "Entering GenericMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>::destructor()"
61  << ": prefix = " << m_prefix
62  << std::endl;
63  }
64 
65  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
66  *m_env.subDisplayFile() << "Leaving GenericMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>::destructor()"
67  << ": prefix = " << m_prefix
68  << std::endl;
69  }
70 }
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

Member Function Documentation

template<class P_V , class P_M , class Q_V , class Q_M >
void QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::covMatrix ( const P_V &  positionVector1,
const P_V &  positionVector2,
Q_M &  imageMatrix 
) const
virtual

Calculates the value of the generic covariance matrix.

This function accesses the routine that calculates the covariance function.

Implements QUESO::BaseMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >.

Definition at line 74 of file GenericMatrixCovarianceFunction.C.

References QUESO::queso_require_equal_to_msg.

75 {
76  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
77  *m_env.subDisplayFile() << "Entering GenericMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>::covMatrix()"
78  << std::endl;
79  }
80 
81  unsigned int matrixOrder = m_imageSet.vectorSpace().dimLocal();
82 
83  queso_require_equal_to_msg(imageMatrix.numRowsLocal(), matrixOrder, "imageMatrix has invalid number of rows");
84 
85  queso_require_equal_to_msg(imageMatrix.numCols(), matrixOrder, "imageMatrix has invalid number of columns");
86 
87  queso_require_msg(m_covRoutinePtr, "m_covRoutinePtr = NULL");
88 
89  m_covRoutinePtr(positionVector1, positionVector2, m_routineDataPtr, imageMatrix);
90 
91  if ((m_env.subDisplayFile()) && (m_env.displayVerbosity() >= 54)) {
92  *m_env.subDisplayFile() << "Leaving GenericMatrixCovarianceFunction<P_V,P_M,Q_V,Q_M>::covMatrix()"
93  << std::endl;
94  }
95 
96  return;
97 }
void(* m_covRoutinePtr)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)
virtual const VectorSpace< V, M > & vectorSpace() const =0
Vector space to which this set belongs to. See template specialization.
const VectorSet< Q_V, Q_M > & m_imageSet
unsigned int dimLocal() const
Definition: VectorSpace.C:155
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
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

Member Data Documentation

template<class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
void(* QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::m_covRoutinePtr)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)
protected

Definition at line 75 of file GenericMatrixCovarianceFunction.h.

template<class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
const void* QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::m_routineDataPtr
protected

Definition at line 76 of file GenericMatrixCovarianceFunction.h.


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

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