25 #ifndef UQ_GENERIC_SCALAR_FUNCTION_H
26 #define UQ_GENERIC_SCALAR_FUNCTION_H
28 #include <queso/ScalarFunction.h>
29 #include <queso/VectorSet.h>
30 #include <queso/VectorSubset.h>
31 #include <queso/Environment.h>
32 #include <queso/Defines.h>
45 template <
class V = GslVector,
class M = GslMatrix>
56 double (*valueRoutinePtr)(
const V& domainVector,
const V* domainDirection,
const void* routinesDataPtr, V* gradVector, M* hessianMatrix, V* hessianEffect),
57 const void* routinesDataPtr,
64 double actualValue (
const V& domainVector,
const V* domainDirection, V* gradVector, M* hessianMatrix, V* hessianEffect)
const;
69 double lnValue (
const V& domainVector,
const V* domainDirection, V* gradVector, M* hessianMatrix, V* hessianEffect)
const;
81 double (*
m_valueRoutinePtr)(
const V& domainVector,
const V* domainDirection,
const void* routinesDataPtr, V* gradVector, M* hessianMatrix, V* hessianEffect);
88 #endif // UQ_GENERIC_SCALAR_FUNCTION_H
virtual ~GenericScalarFunction()
Virtual destructor.
double(* m_valueRoutinePtr)(const V &domainVector, const V *domainDirection, const void *routinesDataPtr, V *gradVector, M *hessianMatrix, V *hessianEffect)
Routine defining a scalar function.
A templated (base) class for handling scalar functions.
double lnValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
Calculates the logarithm of value of this scalar function.
A templated class for handling sets.
const VectorSet< V, M > & domainSet() const
Access to the protected attribute m_domainSet: domain set of the scalar function. ...
const void * m_routinesDataPtr
double actualValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
Calculates the actual value of this scalar function.
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.
A class for handling generic scalar functions.