41 #ifndef BPP_NUMERIC_FUNCTION_OPERATORS_NEGATIVEOPERATOR_H
42 #define BPP_NUMERIC_FUNCTION_OPERATORS_NEGATIVEOPERATOR_H
58 std::shared_ptr<Operator>
son_;
77 return -
son_->getValue();
82 return -
son_->getFirstOrderDerivative(variable);
87 return -
son_->getSecondOrderDerivative(variable);
92 return "-" +
son_->output();
Negative value for an operator.
std::shared_ptr< Operator > son_
NegativeOperator(std::shared_ptr< Operator > son)
std::string output() const
double getFirstOrderDerivative(const std::string &variable) const
double getSecondOrderDerivative(const std::string &variable) const
NegativeOperator * clone() const
Create a copy of this object and send a pointer to it.
std::shared_ptr< Operator > getSon()
Interface of operator for numerical computation.