queso-0.53.0
|
A class for handling generic scalar functions. More...
#include <GenericScalarFunction.h>
Public Member Functions | |
Constructor/Destructor methods | |
GenericScalarFunction (const char *prefix, const VectorSet< V, M > &domainSet, double(*valueRoutinePtr)(const V &domainVector, const V *domainDirection, const void *routinesDataPtr, V *gradVector, M *hessianMatrix, V *hessianEffect), const void *routinesDataPtr, bool routineIsForLn) | |
Default constructor. More... | |
virtual | ~GenericScalarFunction () |
Virtual destructor. More... | |
Mathematical method | |
double | actualValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const |
Calculates the actual value of this scalar function. More... | |
double | lnValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const |
Calculates the logarithm of value of this scalar function. More... | |
Public Member Functions inherited from QUESO::BaseScalarFunction< V, M > | |
BaseScalarFunction (const char *prefix, const VectorSet< V, M > &domainSet) | |
Default constructor. More... | |
virtual | ~BaseScalarFunction () |
Destructor. More... | |
const VectorSet< V, M > & | domainSet () const |
Access to the protected attribute m_domainSet: domain set of the scalar function. More... | |
Protected Attributes | |
double(* | m_valueRoutinePtr )(const V &domainVector, const V *domainDirection, const void *routinesDataPtr, V *gradVector, M *hessianMatrix, V *hessianEffect) |
Routine defining a scalar function. More... | |
const void * | m_routinesDataPtr |
bool | m_routineIsForLn |
Protected Attributes inherited from QUESO::BaseScalarFunction< V, M > | |
const BaseEnvironment & | m_env |
std::string | m_prefix |
const VectorSet< V, M > & | m_domainSet |
Domain set of the scalar function. More... | |
A class for handling generic scalar functions.
This class allows the mathematical definition of a scalar function such as: . It is derived from BaseScalarFunction.
Definition at line 46 of file GenericScalarFunction.h.
QUESO::GenericScalarFunction< V, M >::GenericScalarFunction | ( | const char * | prefix, |
const VectorSet< V, M > & | domainSet, | ||
double(*)(const V &domainVector, const V *domainDirection, const void *routinesDataPtr, V *gradVector, M *hessianMatrix, V *hessianEffect) | valueRoutinePtr, | ||
const void * | routinesDataPtr, | ||
bool | routineIsForLn | ||
) |
Default constructor.
Instantiates an object of this
class given its prefix, domain set and a pointer to a routine. This routine plays the role of a scalar math function, and it is useful, for instance, to calculate the likelihood (and its image set).
Definition at line 39 of file GenericScalarFunction.C.
|
virtual |
|
virtual |
Calculates the actual value of this scalar function.
Implements QUESO::BaseScalarFunction< V, M >.
Definition at line 59 of file GenericScalarFunction.C.
References queso_not_implemented, and queso_require_msg.
|
virtual |
Calculates the logarithm of value of this scalar function.
It is used in routines that calculate the likelihood and expect the logarithm of value.
Implements QUESO::BaseScalarFunction< V, M >.
Definition at line 82 of file GenericScalarFunction.C.
References queso_not_implemented, and queso_require_msg.
|
protected |
Definition at line 83 of file GenericScalarFunction.h.
|
protected |
Definition at line 82 of file GenericScalarFunction.h.
|
protected |
Routine defining a scalar function.
The presence of the parameters gradVectors
, hessianMatrices
and hessianEffects
allows the user to calculate gradient vectors, Hessian matrices and Hessian effects; which can hold important information about her/his statistical application. Used, for instance to define the likelihood.
Definition at line 81 of file GenericScalarFunction.h.