41 #ifndef BPP_NUMERIC_FUNCTION_OPERATORS_FUNCTIONOPERATOR_H
42 #define BPP_NUMERIC_FUNCTION_OPERATORS_FUNCTIONOPERATOR_H
46 #include "../Functions.h"
67 return func_.getValue();
77 return func_.getFirstOrderDerivative(variable);
87 return func_.getSecondOrderDerivative(variable);
107 return getValue_(std::integral_constant<
bool, std::is_base_of<Function, F>::value>{});
112 return getFirstOrderDerivative_(variable, std::integral_constant<
bool, std::is_base_of<DerivableFirstOrder, F>::value>{});
117 return getSecondOrderDerivative_(variable, std::integral_constant<
bool, std::is_base_of<DerivableSecondOrder, F>::value>{});
Implements a double operator (ie leaf in the computation tree) where value comes from a function.
double getFirstOrderDerivative(const std::string &variable) const
double getSecondOrderDerivative_(const std::string &variable, std::false_type) const
FunctionOperator * clone() const
Create a copy of this object and send a pointer to it.
FunctionOperator(F &func, std::string name)
double getSecondOrderDerivative(const std::string &variable) const
std::string output() const
double getValue_(std::false_type) const
double getValue_(std::true_type) const
double getFirstOrderDerivative_(const std::string &variable, std::false_type) const
double getFirstOrderDerivative_(const std::string &variable, std::true_type) const
double getSecondOrderDerivative_(const std::string &variable, std::true_type) const
std::string getName() const
Interface of operator for numerical computation.