7 #include "GeoGenericFunctions/FunctionNegation.h" 10 FUNCTION_OBJECT_IMP(FunctionNegation)
12 FunctionNegation::FunctionNegation(const AbsFunction *arg1):
17 FunctionNegation::FunctionNegation(
const FunctionNegation & right):
19 _arg1(right._arg1->clone())
24 FunctionNegation::~FunctionNegation()
29 unsigned int FunctionNegation::dimensionality()
const {
30 return _arg1->dimensionality();
34 double FunctionNegation::operator ()(
double x)
const 36 return -((*_arg1)(x));
39 double FunctionNegation::operator ()(
const Argument & x)
const 41 return -((*_arg1)(x));
45 Derivative FunctionNegation::partial(
unsigned int index)
const {
46 const Derivative & d = _arg1->partial(index);
47 const AbsFunction & fPrime = -d;
48 return Derivative(&fPrime);