5 #ifndef BPP_NUMERIC_FUNCTION_OPERATORS_FUNCTIONOPERATOR_H 6 #define BPP_NUMERIC_FUNCTION_OPERATORS_FUNCTIONOPERATOR_H 10 #include "../Functions.h" 31 return func_.getValue();
41 return func_.getFirstOrderDerivative(variable);
51 return func_.getSecondOrderDerivative(variable);
61 func_(func), name_(name)
71 return getValue_(std::integral_constant<
bool, std::is_base_of<FunctionInterface, F>::value>{});
76 return getFirstOrderDerivative_(variable, std::integral_constant<
bool, std::is_base_of<FirstOrderDerivable, F>::value>{});
81 return getSecondOrderDerivative_(variable, std::integral_constant<
bool, std::is_base_of<SecondOrderDerivable, F>::value>{});
95 #endif // BPP_NUMERIC_FUNCTION_OPERATORS_FUNCTIONOPERATOR_H double getFirstOrderDerivative_(const std::string &variable, std::true_type) const
double getSecondOrderDerivative_(const std::string &variable, std::false_type) const
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::true_type) const
double getSecondOrderDerivative(const std::string &variable) const
std::string output() const
double getValue_(std::true_type) const
FunctionOperator(F &func, std::string name)
double getValue_(std::false_type) const
FunctionOperator * clone() const
Create a copy of this object and send a pointer to it.
std::string getName() const
double getFirstOrderDerivative_(const std::string &variable, std::false_type) const
Interface of operator for numerical computation.