Home > Extreme Optimization Mathematics Library for .NET > Reference > Extreme.Mathematics.EquationSolvers Namespace
Represents a root finder based on the Newton-Raphson algorithm.
For a list of all members of this type, see NewtonRaphsonSystemSolver Members.
System.Object
IterativeAlgorithm
ManagedIterativeAlgorithm
EquationSystemSolver
NewtonRaphsonSystemSolver
Use the NewtonRaphsonSystemSolver class to solve a system of nonlinear equations using the Newton-Raphson method in multiple dimensions. This algorithm is suitable for 'easy' target functions. For most general applications, the DoglegSystemSolver class offers a more reliable solution.
The target functions are set in one of two ways. The TargetFunction property is a FastMultivariateVectorFunction delegate. This is a function that returns a vector containing the values each target function. Alternatively, the SetTargetFunctions method can be used to provide the target functions as an array of MultivariateRealFunction delegates.
Similarly, the gradients of the target functions can be set in two ways. The JacobianFunction property is a FastMultivariateMatrixFunction delegate that calculates the Jacobian of the system of equations. The Jacobian is a matrix whose rows are the gradients of the target functions. Alternatively, the SetGradientFunctions method lets you supply the gradients of individual target functions as an array of either MultivariateVectorFunction or FastMultivariateVectorFunction delegates.
The starting point for the iteration is set through the InitialGuess property. This property must be set to a valid Vector before the algorithm is run. The AbsoluteTolerance and RelativeTolerance properties set the desired precision as specified by the ConvergenceCriterion property. The default value for both tolerances is SqrtEpsilon (roughly 10-8). MaxIterations sets the maximum number of iterations, while MaxEvaluations sets the maximum number of function evaluations.
The Solve method performs the actual approximation of the solution. This method returns the best approximation that was found. The Status property indicates whether the algorithm was successful.
The algorithm has two convergence tests. By default, the algorithm terminates when either of these is satisfied. You can deactivate either test by setting its Active property to false. If both tests are deactivated, then the algorithm always terminates when the maximum number of iterations or function evaluations is reached.
The first test is based on the uncertainty in the location of the approximate solution. The SolutionTest property returns a VectorConvergenceTest object that allows you to specify the desired Tolerance and specific ConvergenceCriterion. See the VectorConvergenceTest class for details on how to further customize this test.
The second test is based on the value of the target functions at the approximate solution. The ValueTest property returns a VectorConvergenceTest object that can be used to customize the test. By default, the error is set to the component with the largest absolute value.
Namespace: Extreme.Mathematics.EquationSolvers
Assembly: Extreme.Mathematics (in Extreme.Mathematics.dll)
NewtonRaphsonSystemSolver Members | Extreme.Mathematics.EquationSolvers Namespace | DoglegSystemSolver