queso-0.53.0
List of all members
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 >:
Inheritance graph
[legend]
Collaboration diagram for QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >:
Collaboration graph
[legend]

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 voidm_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 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
const VectorSet< P_V, P_M > & basicDomainSet() const
Domain set; access to private attribute m_basicDomainSet.
void(* m_covRoutinePtr)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
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:396
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274

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_require_equal_to_msg, and queso_require_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 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
const VectorSet< Q_V, Q_M > & m_imageSet
unsigned int dimLocal() const
Definition: VectorSpace.C:170
void(* m_covRoutinePtr)(const P_V &positionVector1, const P_V &positionVector2, const void *routineDataPtr, Q_M &imageMatrix)
#define queso_require_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:85
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
virtual const VectorSpace< V, M > & vectorSpace() const =0
Vector space to which this set belongs to. See template specialization.

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 Thu Jun 11 2015 13:52:35 for queso-0.53.0 by  doxygen 1.8.5