Click or drag to resize

NumericalDerivative Class

Class to evaluate the numerical derivative of a function using finite difference approximations. Variable point and center methods can be initialized . This class can also be used to return function handles (delegates) for a fixed derivative order and variable. It is possible to evaluate the derivative and partial derivative of univariate and multivariate functions respectively.
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.DifferentiationNumericalDerivative

Namespace: Altaxo.Calc.Differentiation
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class NumericalDerivative

The NumericalDerivative type exposes the following members.

Constructors
 NameDescription
Public methodNumericalDerivative Initializes a NumericalDerivative class with the default 3 point center difference method.
Public methodNumericalDerivative(Int32, Int32) Initialized a NumericalDerivative class.
Top
Properties
 NameDescription
Public propertyBaseStepSize Sets and gets the base finite difference step size. This assigned value to this parameter is only used if StepType is set to RelativeX. However, if the StepType is Relative, it will contain the base step size computed from Epsilon based on the finite difference order.
Public propertyCenter Sets and gets the location of the center point for the finite difference derivative.
Public propertyEpsilon Sets and gets the base finite difference step size. This parameter is only used if StepType is set to Relative. By default this is set to machine epsilon, from which BaseStepSize is computed.
Public propertyEvaluations Number of times a function is evaluated for numerical derivatives.
Public propertyStepSize Sets and gets the finite difference step size. This value is for each function evaluation if relative step size types are used. If the base step size used in scaling is desired, see Epsilon.
Public propertyStepType Type of step size for computing finite differences. If set to absolute, dx = h. If set to relative, dx = (1+abs(x))*h^(2/(order+1)). This provides accurate results when h is approximately equal to the square-root of machine accuracy, epsilon.
Top
Methods
 NameDescription
Public methodCreateDerivativeFunctionHandle Creates a function handle for the derivative of a scalar univariate function.
Public methodCreateMixedPartialDerivativeFunctionHandle(FuncDouble, Double, Int32, Int32) Creates a function handle for the mixed partial derivative of a multivariate function.
Public methodCreateMixedPartialDerivativeFunctionHandle(FuncDouble, Double, Int32, Int32) Creates a function handle for the mixed partial derivative of a multivariate vector function.
Public methodCreatePartialDerivativeFunctionHandle(FuncDouble, Double, Int32, Int32) Creates a function handle for the partial derivative of a multivariate function.
Public methodCreatePartialDerivativeFunctionHandle(FuncDouble, Double, Int32, Int32) Creates a function handle for the partial derivative of a vector multivariate function.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodEvaluateDerivative(Double, Int32, Double) Evaluates the derivative of equidistant points using the finite difference method.
Public methodEvaluateDerivative(FuncDouble, Double, Double, Int32, NullableDouble) Evaluates the derivative of a scalar univariate function.
Public methodEvaluateMixedPartialDerivative(FuncDouble, Double, Double, Int32, Int32, NullableDouble) Evaluates the mixed partial derivative of variable order for multivariate functions.
Public methodEvaluateMixedPartialDerivative(FuncDouble, Double, Double, Int32, Int32, NullableDouble) Evaluates the mixed partial derivative of variable order for multivariate function arrays.
Public methodEvaluatePartialDerivative(FuncDouble, Double, Double, Int32, Int32, NullableDouble) Evaluates the partial derivative of a multivariate function.
Public methodEvaluatePartialDerivative(FuncDouble, Double, Double, Int32, Int32, NullableDouble) Evaluates the partial derivatives of a multivariate function array.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodResetEvaluations Resets the evaluation counter.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also