5 #ifndef BPP_NUMERIC_FUNCTION_OPERATORS_NEGATIVEOPERATOR_H 6 #define BPP_NUMERIC_FUNCTION_OPERATORS_NEGATIVEOPERATOR_H 22 std::shared_ptr<Operator>
son_;
41 return -son_->getValue();
46 return -son_->getFirstOrderDerivative(variable);
51 return -son_->getSecondOrderDerivative(variable);
56 return "-" + son_->output();
60 #endif // BPP_NUMERIC_FUNCTION_OPERATORS_NEGATIVEOPERATOR_H NegativeOperator(std::shared_ptr< Operator > son)
NegativeOperator * clone() const
Create a copy of this object and send a pointer to it.
std::shared_ptr< Operator > getSon()
double getFirstOrderDerivative(const std::string &variable) const
std::shared_ptr< Operator > son_
Negative value for an operator.
double getSecondOrderDerivative(const std::string &variable) const
Interface of operator for numerical computation.
std::string output() const