bpp-core3
3.0.0
|
Numerical derivative function wrapper, partial implementation. More...
#include <Bpp/Numeric/Function/AbstractNumericalDerivative.h>
Public Member Functions | |
AbstractNumericalDerivative (Function *function) | |
AbstractNumericalDerivative (DerivableFirstOrder *function) | |
AbstractNumericalDerivative (DerivableSecondOrder *function) | |
AbstractNumericalDerivative (const AbstractNumericalDerivative &ad) | |
AbstractNumericalDerivative & | operator= (const AbstractNumericalDerivative &ad) |
virtual | ~AbstractNumericalDerivative () |
AbstractNumericalDerivative * | clone () const =0 |
Create a copy of this object and send a pointer to it. More... | |
void | setInterval (double h) |
Set the interval value used in numerical approximation. More... | |
double | getInterval () const |
void | setParametersToDerivate (const std::vector< std::string > &variables) |
Set the list of parameters to derivate numerically. More... | |
void | enableSecondOrderCrossDerivatives (bool yn) |
bool | enableSecondOrderCrossDerivatives () const |
virtual double | d2f (const std::string &variable, const ParameterList ¶meters) |
Get the value of the second order derivative of the function according to a given set of parameters. More... | |
virtual double | d2f (const std::string &variable1, const std::string &variable2, const ParameterList ¶meters) |
Get the value of the cross derivative of the function according to a given set of parameters. More... | |
virtual double | df (const std::string &variable, const ParameterList ¶meters) |
Get the value of the first derivative of the function according to a given set of parameters. More... | |
virtual double | getValue () const =0 |
Get the value of the function at the current point. More... | |
virtual bool | hasParameter (const std::string &name) const =0 |
Tell if there is a parameter with specified name. More... | |
virtual const ParameterList & | getParameters () const =0 |
Get all parameters available. More... | |
virtual const Parameter & | getParameter (const std::string &name) const =0 |
Get the parameter with specified name. More... | |
virtual double | getParameterValue (const std::string &name) const =0 |
Get the value for parameter of name 'name'. More... | |
virtual size_t | getNumberOfParameters () const =0 |
Get the number of parameters. More... | |
virtual void | setNamespace (const std::string &prefix)=0 |
Set the namespace for the parameter names. More... | |
virtual std::string | getNamespace () const =0 |
virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const =0 |
Resolves a parameter name according to the current namespace. More... | |
bool | hasParameter (const std::string &name) const |
Tell if there is a parameter with specified name. More... | |
const ParameterList & | getParameters () const |
Get all parameters available. More... | |
const Parameter & | getParameter (const std::string &name) const |
Get the parameter with specified name. More... | |
double | getValue () const |
Get the value of the function at the current point. More... | |
double | getParameterValue (const std::string &name) const |
Get the value for parameter of name 'name'. More... | |
size_t | getNumberOfParameters () const |
Get the number of parameters. More... | |
void | setNamespace (const std::string &prefix) |
Set the namespace for the parameter names. More... | |
std::string | getNamespace () const |
std::string | getParameterNameWithoutNamespace (const std::string &name) const |
Resolves a parameter name according to the current namespace. More... | |
The DerivableFirstOrder interface | |
void | enableFirstOrderDerivatives (bool yn) |
Tell if derivatives must be computed. More... | |
bool | enableFirstOrderDerivatives () const |
Tell if derivatives must be computed. More... | |
double | getFirstOrderDerivative (const std::string &variable) const |
Get the derivative of the function at the current point. More... | |
The DerivableSecondOrder interface | |
void | enableSecondOrderDerivatives (bool yn) |
Tell if derivatives must be computed. More... | |
bool | enableSecondOrderDerivatives () const |
Tell if derivatives must be computed. More... | |
double | getSecondOrderDerivative (const std::string &variable) const |
Get the second order derivative of the function at the current point. More... | |
double | getSecondOrderDerivative (const std::string &variable1, const std::string &variable2) const |
Get the value of the cross derivative of the function according to a given set of parameters. More... | |
The Parametrizable interface. | |
double | f (const ParameterList ¶meters) |
Get the value of the function according to a given set of parameters. More... | |
void | setParameters (const ParameterList ¶meters) |
Set the point where the function must be computed. More... | |
void | setAllParametersValues (const ParameterList ¶meters) |
Set the parameters values to be equals to those of parameters. More... | |
void | setParameterValue (const std::string &name, double value) |
Set the value of parameter with name name to be equal to value. More... | |
void | setParametersValues (const ParameterList ¶meters) |
Update the parameters from parameters. More... | |
bool | matchParametersValues (const ParameterList ¶meters) |
Update the parameters from parameters. More... | |
Protected Member Functions | |
virtual void | updateDerivatives (const ParameterList parameters)=0 |
Compute derivatives. More... | |
virtual ParameterList & | getParameters_ ()=0 |
Get all parameters available. More... | |
ParameterList & | getParameters_ () |
Get all parameters available. More... | |
Protected Attributes | |
DerivableFirstOrder * | function1_ |
DerivableSecondOrder * | function2_ |
double | h_ |
std::vector< std::string > | variables_ |
std::map< std::string, size_t > | index_ |
std::vector< double > | der1_ |
std::vector< double > | der2_ |
RowMatrix< double > | crossDer2_ |
bool | computeD1_ |
bool | computeD2_ |
bool | computeCrossD2_ |
Function * | function_ |
Numerical derivative function wrapper, partial implementation.
This class provides a wrapper for Function object, implementing the DerivableSecondOrder interface (Although no cross derivative is implemented for now). Derivations of this class can be used as full DerivableSecondOrder objects, with derivative functions.
Three kinds of constructors are provided: one with a Function object, another with a DerivableFirstOrder object, and one with a DerivableSecondOrder object. In the first case, all derivatives will be computed numerically. In the second case, first order derivative will be computed numerically only if no appropriate analytical derivative is available, second order derivative will always be computed numerically. In the last case, first and second order derivative will be computed numerically only if no appropriate analytical derivative is available.
Definition at line 67 of file AbstractNumericalDerivative.h.
|
inline |
Definition at line 83 of file AbstractNumericalDerivative.h.
|
inline |
Definition at line 88 of file AbstractNumericalDerivative.h.
|
inline |
Definition at line 93 of file AbstractNumericalDerivative.h.
|
inline |
Definition at line 98 of file AbstractNumericalDerivative.h.
|
inlinevirtual |
Definition at line 120 of file AbstractNumericalDerivative.h.
|
pure virtual |
Create a copy of this object and send a pointer to it.
Implements bpp::DerivableSecondOrder.
Implemented in bpp::TwoPointsNumericalDerivative, bpp::ThreePointsNumericalDerivative, and bpp::FivePointsNumericalDerivative.
|
inlinevirtualinherited |
Get the value of the second order derivative of the function according to a given set of parameters.
variable | The name of the ![]() ![]() |
parameters | The parameter set to pass to the function. |
Exception | If an error occured. |
Definition at line 228 of file Functions.h.
References bpp::DerivableSecondOrder::getSecondOrderDerivative(), and bpp::Function::setParameters().
|
inlinevirtualinherited |
Get the value of the cross derivative of the function according to a given set of parameters.
variable1 | The name of the ![]() ![]() |
variable2 | The name of the ![]() ![]() |
parameters | The parameter set to pass to the function. |
Exception | If an error occured. |
Definition at line 255 of file Functions.h.
References bpp::DerivableSecondOrder::getSecondOrderDerivative(), and bpp::Function::setParameters().
|
inlinevirtualinherited |
Get the value of the first derivative of the function according to a given set of parameters.
variable | The name of the ![]() ![]() |
parameters | The parameter set to pass to the function. |
Exception | If an error occured. |
Definition at line 173 of file Functions.h.
References bpp::DerivableFirstOrder::getFirstOrderDerivative(), and bpp::Function::setParameters().
|
inlinevirtual |
Tell if derivatives must be computed.
Implements bpp::DerivableFirstOrder.
Definition at line 163 of file AbstractNumericalDerivative.h.
References computeD1_.
|
inlinevirtual |
Tell if derivatives must be computed.
yn | yes/no |
Implements bpp::DerivableFirstOrder.
Definition at line 162 of file AbstractNumericalDerivative.h.
References computeD1_.
|
inline |
Definition at line 254 of file AbstractNumericalDerivative.h.
References computeCrossD2_.
|
inline |
Definition at line 253 of file AbstractNumericalDerivative.h.
References computeCrossD2_.
|
inlinevirtual |
Tell if derivatives must be computed.
Implements bpp::DerivableSecondOrder.
Definition at line 184 of file AbstractNumericalDerivative.h.
References computeD2_.
|
inlinevirtual |
Tell if derivatives must be computed.
yn | yes/no |
Implements bpp::DerivableSecondOrder.
Definition at line 183 of file AbstractNumericalDerivative.h.
References computeD2_.
|
inlinevirtual |
Get the value of the function according to a given set of parameters.
parameters | The parameter set to pass to the function. |
Exception | If an error occured. |
Reimplemented from bpp::Function.
Definition at line 217 of file AbstractNumericalDerivative.h.
References bpp::FunctionWrapper::getValue(), and setParameters().
|
inlinevirtual |
Get the derivative of the function at the current point.
variable | The name of the ![]() ![]() |
Exception | If no point is specified or if an error occured. |
Implements bpp::DerivableFirstOrder.
Definition at line 165 of file AbstractNumericalDerivative.h.
References computeD1_, der1_, function1_, bpp::DerivableFirstOrder::getFirstOrderDerivative(), and index_.
|
inline |
Definition at line 137 of file AbstractNumericalDerivative.h.
References h_.
|
inlinevirtualinherited |
Implements bpp::Parametrizable.
Definition at line 347 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getNamespace().
|
pure virtualinherited |
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getNamespace().
|
inlinevirtualinherited |
Get the number of parameters.
Implements bpp::Parametrizable.
Definition at line 337 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getNumberOfParameters().
|
pure virtualinherited |
Get the number of parameters.
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, bpp::DirectionFunction, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getNumberOfParameters(), and bpp::BppODiscreteDistributionFormat::writeDiscreteDistribution().
|
inlinevirtualinherited |
Get the parameter with specified name.
name | The name of the parameter to look for. |
ParameterNotFoundException | if no parameter with this name is found. |
Implements bpp::Parametrizable.
Definition at line 297 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getParameter().
|
pure virtualinherited |
Get the parameter with specified name.
name | The name of the parameter to look for. |
ParameterNotFoundException | if no parameter with this name is found. |
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameter().
|
inlinevirtualinherited |
Resolves a parameter name according to the current namespace.
Implements bpp::Parametrizable.
Definition at line 352 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getParameterNameWithoutNamespace().
|
pure virtualinherited |
Resolves a parameter name according to the current namespace.
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameterNameWithoutNamespace(), and bpp::BppOParametrizableFormat::write().
|
inlinevirtualinherited |
Get all parameters available.
Implements bpp::Parametrizable.
Definition at line 292 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getParameters().
|
pure virtualinherited |
Get all parameters available.
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, bpp::DirectionFunction, and bpp::AbstractParametrizable.
Referenced by bpp::NewtonOneDimension::doStep(), bpp::LogsumHmmLikelihood::fireParameterChanged(), bpp::FunctionWrapper::getParameters(), bpp::LogsumHmmLikelihood::LogsumHmmLikelihood(), setParameterValue(), bpp::AbstractOptimizer::step(), and bpp::BppOParametrizableFormat::write().
|
inlineprotectedvirtualinherited |
Get all parameters available.
Implements bpp::Parametrizable.
Definition at line 358 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getParameters_().
|
protectedpure virtualinherited |
Get all parameters available.
Implemented in bpp::FunctionWrapper, bpp::DirectionFunction, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameters_().
|
inlinevirtualinherited |
Get the value for parameter of name 'name'.
name | The name of the parameter. |
Implements bpp::Parametrizable.
Definition at line 312 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::getParameterValue().
|
pure virtualinherited |
Get the value for parameter of name 'name'.
name | The name of the parameter. |
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::getParameterValue().
|
inlinevirtual |
Get the second order derivative of the function at the current point.
variable | The name of the ![]() ![]() |
Exception | If no point is specified or if an error occured. |
Implements bpp::DerivableSecondOrder.
Reimplemented in bpp::TwoPointsNumericalDerivative.
Definition at line 186 of file AbstractNumericalDerivative.h.
References computeD2_, der2_, function2_, bpp::DerivableSecondOrder::getSecondOrderDerivative(), and index_.
|
inlinevirtual |
Get the value of the cross derivative of the function according to a given set of parameters.
variable1 | The name of the ![]() ![]() |
variable2 | The name of the ![]() ![]() |
Exception | If an error occured. |
Implements bpp::DerivableSecondOrder.
Reimplemented in bpp::TwoPointsNumericalDerivative, and bpp::FivePointsNumericalDerivative.
Definition at line 198 of file AbstractNumericalDerivative.h.
References computeCrossD2_, crossDer2_, function2_, bpp::DerivableSecondOrder::getSecondOrderDerivative(), and index_.
|
inlinevirtualinherited |
Get the value of the function at the current point.
Exception | If no point is specified or if an error occured. |
Implements bpp::Function.
Reimplemented in bpp::TwoPointsNumericalDerivative, bpp::ThreePointsNumericalDerivative, and bpp::InfinityFunctionWrapper.
Definition at line 302 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Function::getValue().
Referenced by f().
|
pure virtualinherited |
Get the value of the function at the current point.
Exception | If no point is specified or if an error occured. |
Implemented in bpp::RescaledHmmLikelihood, bpp::LowMemoryRescaledHmmLikelihood, bpp::LogsumHmmLikelihood, bpp::TwoPointsNumericalDerivative, bpp::ThreePointsNumericalDerivative, bpp::ReparametrizationFunctionWrapper, bpp::TestFunction, bpp::InfinityFunctionWrapper, bpp::FunctionWrapper, bpp::FivePointsNumericalDerivative, and bpp::DirectionFunction.
Referenced by bpp::MetaOptimizer::doInit(), bpp::MetaOptimizer::doStep(), bpp::SimpleMultiDimensions::doStep(), bpp::SimpleNewtonMultiDimensions::doStep(), bpp::Function::f(), bpp::FunctionWrapper::getValue(), bpp::InfinityFunctionWrapper::getValue(), bpp::ReparametrizationFunctionWrapper::getValue(), and bpp::AbstractOptimizer::init().
|
inlinevirtualinherited |
Tell if there is a parameter with specified name.
name | The name of the parameter to look for. |
Implements bpp::Parametrizable.
Definition at line 282 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::hasParameter().
|
pure virtualinherited |
Tell if there is a parameter with specified name.
name | The name of the parameter to look for. |
Implemented in bpp::ParametrizableAdapter, bpp::FunctionWrapper, and bpp::AbstractParametrizable.
Referenced by bpp::FunctionWrapper::hasParameter().
|
inlinevirtual |
Update the parameters from parameters.
Only common parameters with parameters will be updated.
parameters | A list of parameters. |
ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implements bpp::Parametrizable.
Definition at line 245 of file AbstractNumericalDerivative.h.
References bpp::FunctionWrapper::function_, bpp::Parametrizable::matchParametersValues(), and updateDerivatives().
|
inline |
Definition at line 103 of file AbstractNumericalDerivative.h.
References computeCrossD2_, computeD1_, computeD2_, crossDer2_, der1_, der2_, function1_, function2_, h_, index_, bpp::FunctionWrapper::operator=(), and variables_.
|
inlinevirtual |
Set the parameters values to be equals to those of parameters.
The list must contain exactly the same parameters (ie same names) than the parameters available.
parameters | A list with all parameters. |
ParameterNotFoundException | If a some parameter in the list is not in params. |
ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implements bpp::Parametrizable.
Definition at line 227 of file AbstractNumericalDerivative.h.
References bpp::FunctionWrapper::function_, bpp::Parametrizable::setAllParametersValues(), and updateDerivatives().
|
inline |
Set the interval value used in numerical approximation.
Default value is 0.0001.
h | Interval value. |
Definition at line 132 of file AbstractNumericalDerivative.h.
References h_.
|
inlinevirtualinherited |
Set the namespace for the parameter names.
prefix | The 'namespace', that is a prefix to add to all parameter names. If parameter names are already prefixed, the new prefix will be used instead. |
Implements bpp::Parametrizable.
Definition at line 342 of file Functions.h.
References bpp::FunctionWrapper::function_, and bpp::Parametrizable::setNamespace().
|
pure virtualinherited |
Set the namespace for the parameter names.
prefix | The 'namespace', that is a prefix to add to all parameter names. If parameter names are already prefixed, the new prefix will be used instead. |
Implemented in bpp::MixtureOfDiscreteDistributions, bpp::InvariantMixedDiscreteDistribution, bpp::ParametrizableAdapter, bpp::FunctionWrapper, bpp::AbstractParametrizable, bpp::AbstractParameterAliasable, bpp::RescaledHmmLikelihood, bpp::LowMemoryRescaledHmmLikelihood, and bpp::LogsumHmmLikelihood.
Referenced by bpp::InvariantMixedDiscreteDistribution::InvariantMixedDiscreteDistribution(), bpp::LogsumHmmLikelihood::setNamespace(), bpp::FunctionWrapper::setNamespace(), and bpp::InvariantMixedDiscreteDistribution::setNamespace().
|
inlinevirtual |
Set the point where the function must be computed.
parameters | The parameter set to pass to the function. |
Implements bpp::Function.
Definition at line 222 of file AbstractNumericalDerivative.h.
References bpp::FunctionWrapper::function_, bpp::Function::setParameters(), and updateDerivatives().
Referenced by f().
|
inline |
Set the list of parameters to derivate numerically.
variables | A list of all parameter names. |
Definition at line 144 of file AbstractNumericalDerivative.h.
References crossDer2_, der1_, der2_, index_, bpp::RowMatrix< Scalar >::resize(), and variables_.
|
inlinevirtual |
Update the parameters from parameters.
parameters must be a subset of all parameters available.
parameters | A list containing all parameters to update. |
ParameterNotFoundException | If a some parameter in params is not in the list. |
ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Implements bpp::Parametrizable.
Definition at line 239 of file AbstractNumericalDerivative.h.
References bpp::FunctionWrapper::function_, bpp::Parametrizable::setParametersValues(), and updateDerivatives().
|
inlinevirtual |
Set the value of parameter with name name to be equal to value.
name | the name of the parameter to set. |
value | The value of the parameter. |
ParameterNotFoundException | If no parameter in the list has the name name. |
ConstraintException | If value does not match the constraint associated to parameter name. |
Implements bpp::Parametrizable.
Definition at line 233 of file AbstractNumericalDerivative.h.
References bpp::ParameterList::createSubList(), bpp::FunctionWrapper::function_, bpp::Parametrizable::getParameters(), bpp::Parametrizable::setParameterValue(), and updateDerivatives().
|
protectedpure virtual |
Compute derivatives.
parameters | The point where to compute derivatives. It is NOT passed as references, as the inner parameters of the function will be changed when computing the numerical derivatives. |
Implemented in bpp::TwoPointsNumericalDerivative, bpp::ThreePointsNumericalDerivative, and bpp::FivePointsNumericalDerivative.
Referenced by matchParametersValues(), setAllParametersValues(), setParameters(), setParametersValues(), and setParameterValue().
|
protected |
Definition at line 80 of file AbstractNumericalDerivative.h.
Referenced by enableSecondOrderCrossDerivatives(), getSecondOrderDerivative(), and operator=().
|
protected |
Definition at line 80 of file AbstractNumericalDerivative.h.
Referenced by enableFirstOrderDerivatives(), getFirstOrderDerivative(), and operator=().
|
protected |
Definition at line 80 of file AbstractNumericalDerivative.h.
Referenced by enableSecondOrderDerivatives(), getSecondOrderDerivative(), and operator=().
|
protected |
Definition at line 79 of file AbstractNumericalDerivative.h.
Referenced by getSecondOrderDerivative(), operator=(), and setParametersToDerivate().
|
protected |
Definition at line 77 of file AbstractNumericalDerivative.h.
Referenced by getFirstOrderDerivative(), operator=(), and setParametersToDerivate().
|
protected |
Definition at line 78 of file AbstractNumericalDerivative.h.
Referenced by getSecondOrderDerivative(), operator=(), and setParametersToDerivate().
|
protected |
Definition at line 72 of file AbstractNumericalDerivative.h.
Referenced by getFirstOrderDerivative(), and operator=().
|
protected |
Definition at line 73 of file AbstractNumericalDerivative.h.
Referenced by getSecondOrderDerivative(), and operator=().
|
protectedinherited |
Definition at line 270 of file Functions.h.
Referenced by bpp::DerivableFirstOrderWrapper::enableFirstOrderDerivatives(), bpp::DerivableSecondOrderWrapper::enableSecondOrderDerivatives(), bpp::FunctionWrapper::f(), bpp::DerivableFirstOrderWrapper::getFirstOrderDerivative(), bpp::InfinityDerivableFirstOrderWrapper::getFirstOrderDerivative(), bpp::FunctionWrapper::getNamespace(), bpp::FunctionWrapper::getNumberOfParameters(), bpp::FunctionWrapper::getParameter(), bpp::FunctionWrapper::getParameterNameWithoutNamespace(), bpp::FunctionWrapper::getParameters(), bpp::FunctionWrapper::getParameters_(), bpp::FunctionWrapper::getParameterValue(), bpp::DerivableSecondOrderWrapper::getSecondOrderDerivative(), bpp::InfinityDerivableSecondOrderWrapper::getSecondOrderDerivative(), bpp::FunctionWrapper::getValue(), bpp::InfinityFunctionWrapper::getValue(), bpp::FunctionWrapper::hasParameter(), matchParametersValues(), bpp::FunctionWrapper::matchParametersValues(), bpp::InfinityFunctionWrapper::matchParametersValues(), bpp::FunctionWrapper::operator=(), setAllParametersValues(), bpp::FunctionWrapper::setAllParametersValues(), bpp::InfinityFunctionWrapper::setAllParametersValues(), bpp::FunctionWrapper::setNamespace(), setParameters(), bpp::FunctionWrapper::setParameters(), bpp::InfinityFunctionWrapper::setParameters(), setParametersValues(), bpp::FunctionWrapper::setParametersValues(), bpp::InfinityFunctionWrapper::setParametersValues(), setParameterValue(), bpp::FunctionWrapper::setParameterValue(), and bpp::InfinityFunctionWrapper::setParameterValue().
|
protected |
Definition at line 74 of file AbstractNumericalDerivative.h.
Referenced by getInterval(), operator=(), and setInterval().
|
mutableprotected |
Definition at line 76 of file AbstractNumericalDerivative.h.
Referenced by getFirstOrderDerivative(), getSecondOrderDerivative(), operator=(), and setParametersToDerivate().
|
protected |
Definition at line 75 of file AbstractNumericalDerivative.h.
Referenced by operator=(), and setParametersToDerivate().