NumericalDerivatives Class |
Namespace: Imsl.Math
The NumericalDerivatives type exposes the following members.
Name | Description | |
---|---|---|
![]() | NumericalDerivatives |
Constructor for NumericalDerivatives.
|
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | EvaluateF |
This method is provided by the user to compute the function values
at the current independent variable values y.
|
![]() | EvaluateJ |
Evaluates the Jacobian for a system of (m) equations in
(n) variables.
|
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetPercentageFactor |
Returns the percentage factor for differencing.
|
![]() | GetScalingFactors |
Returns the scaling factors for the y values.
|
![]() | GetStats |
Returns status information. This information might prove useful to
the user wanting to gain better control over the differencing
parameters. This information can often be ignored.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | SetDifferencingMethods |
Sets the methods used to compute the derivatives.
|
![]() | SetInitialF |
Set the initial function values.
|
![]() | SetPercentageFactor |
Sets the percentage factor for differencing
|
![]() | SetScalingFactors |
Sets the scaling factors for the y values. The user can
also use scale to provide appropriate signs for the
increments.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
NumericalDerivatives uses divided finite differences to compute the Jacobian. This class is designed for use in numerical methods for solving nonlinear problems where a Jacobian is evaluated repeatedly at neighboring arguments. For example, this occurs in a Gauss-Newton method for solving non-linear least squares problems or a non-linear optimization method.
NumericalDerivatives is suited for applications where the
Jacobian is a dense matrix. All cases ,
, or
are
allowed. Both one-sided and central divided differences can be used.
The design allows for computation of derivatives in a variety of
contexts. Note that a gradient should be considered as the special
case with ,
. A
derivative of a single function of one variable is the case
,
. Any non-linear
solving routine that optionally requests a Jacobian or gradient can use
NumericalDerivatives. This should be considered if there are
special properties or scaling issues associated with
. Use the method
SetDifferencingMethods to specify different differencing options
for numerical differentiation. These can be combined with some
analytic subexpressions or other known relationships.
The divided differences are computed using values of the independent
variables at the initial point , and
differenced points
. Here
the
, are the unit coordinate
vectors. The value for each difference del depends on the
variable j, the differencing method, and the scaling for that
variable. This difference is computed internally. See
SetPercentageFactor for computational details. The evaluation
of
is normally done by the user-provided
method NumericalDerivatives.IFunction.F, using the values
. The index j and values
are arguments to
NumericalDerivatives.IFunction.F.
The computational kernel of EvaluateJ performs the following
steps:
evaluate the equations at the point y using
NumericalDerivatives.IFunction.F.compute the Jacobian.compute the difference at .
By default, EvaluateJ uses NumericalDerivatives.IFunction.F in step 3. The user may choose to override the EvaluateF method to extend the capability of the class beyond the default.
There are six examples provided which illustrate various ways to use NumericalDerivatives. A discussion of the expected errors for these difference methods is found in A First Course in Numerical Analysis, Anthony Ralston, McGraw-Hill, NY, (1965).