Function Math.Get Forward Differentiator Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Get | Creates a function of one variable that represents the numerical derivative of the specified function of one variable using forward differences. |
Get | Creates a function of one variable that represents the numerical derivative of the specified function of one variable using forward differences. |
GetForwardDifferentiator(Func<Double, Double>)
Creates a function of one variable that
represents the numerical derivative of the specified
function of one variable using
forward differences.
public static Func<double, double> GetForwardDifferentiator(
this Func<double, double> targetFunction
)
Parameters
Return Value
Func<Double, Double>A delegate that represents a function of one variable that represents the numerical derivative of targetFunction
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Func<Double, Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Forward differences are used for the calculation of the derivative.
Exceptions
Argument | targetFunction is null. |
GetForwardDifferentiator(Func<Double, Double>, Int32, Int32, Boolean, Double, Double, Double)
Creates a function of one variable that
represents the numerical derivative of the specified
function of one variable using forward differences.
public static Func<double, double> GetForwardDifferentiator(
this Func<double, double> targetFunction,
int derivativeOrder,
int accuracyOrder = 2,
bool adaptive = false,
double xMin = -1.79769313486232E+308,
double xMax = 1.79769313486232E+308,
double noiseFactor = 10
)
Parameters
- targetFunction Func<Double, Double>
- A delegate that represents a function of one variable.
- derivativeOrder Int32
- The order of the derivative to compute.
- accuracyOrder Int32 (Optional)
- Optional. The accuracy order of the finite difference method. The default is 2.
- adaptive Boolean (Optional)
- Optional. If true, the step size is computed based on the function values around the points where the function's derivative is requested. If false (the default), a default step size is used.
- xMin Double (Optional)
- Optional. The smallest value for which the function may be evaluated. The default is MinValue.
- xMax Double (Optional)
- Optional. The largest value for which the function may be evaluated. The default is MaxValue.
- noiseFactor Double (Optional)
- Optional. An estimate for the noise in the function values relative to the machine precision. The default is 10.
Return Value
Func<Double, Double>A delegate that returns a numerical approximation to the derivative of order derivativeOrder of targetFunction at its argument.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Func<Double, Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Argument | targetFunction is null. |
Argument | derivativeOrder is less than zero. -or- accuracyOrder is less than one. |