25 #ifndef UQ_SCALAR_FUNCTION_H
26 #define UQ_SCALAR_FUNCTION_H
28 #include <queso/Environment.h>
29 #include <queso/VectorSet.h>
30 #include <queso/VectorSubset.h>
31 #include <queso/ScopedPtr.h>
37 class BoostInputOptionsParser;
51 template <
class V = GslVector,
class M = GslMatrix>
81 virtual double lnValue(
const V & domainVector,
82 const V * domainDirection,
85 V * hessianEffect)
const;
94 virtual double lnValue(
const V & domainVector)
const;
108 virtual double lnValue(
const V & domainVector, V & gradVector)
const;
127 virtual double lnValue(
const V & domainVector,
129 const V & domainDirection,
130 V & hessianEffect)
const;
133 virtual double actualValue(
const V & domainVector,
const V * domainDirection,
134 V * gradVector, M * hessianMatrix, V * hessianEffect)
const = 0;
161 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
172 #endif // UQ_SCALAR_FUNCTION_H
A templated (base) class for handling scalar functions.
std::unique_ptr< T > Type
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
BaseScalarFunction(const char *prefix, const VectorSet< V, M > &domainSet)
Default constructor.
virtual ~BaseScalarFunction()
Destructor.
void setFiniteDifferenceStepSize(double fdStepSize)
Sets the step size for finite differencing gradients.
A templated class for handling sets.
ScopedPtr< BoostInputOptionsParser >::Type m_parser
Input parser.
const VectorSet< V, M > & domainSet() const
Access to the protected attribute m_domainSet: domain set of the scalar function. ...
const BaseEnvironment & m_env
virtual double lnValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
Logarithm of the value of the scalar function. Deprecated.
std::vector< double > m_fdStepSize
Finite different step size.
const VectorSet< V, M > & m_domainSet
Domain set of the scalar function.
virtual double actualValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const =0
Actual value of the scalar function.