NewtonRaphson Class

A class for finding zeros of a method, using the Newton-Raphson method

If the derivative is available, it can be provided, otherwise it works by numerically calculating the derivative.

Definition

Namespace: DHI.Mike1D.Generic.MathAlgorithms
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class NewtonRaphson
Inheritance
Object    NewtonRaphson

Constructors

NewtonRaphson(NewtonRaphsonFunction) Constructor for finding zeros of the function
NewtonRaphson(NewtonRaphsonFunction, NewtonRaphsonFunction) Constructor for finding zeros of the function

Properties

Derivative Derivative of function to solve, if available, otherwise null.
Epsilon Epsilon, used in stopping criteria in the Newton-Raphson method.

Default value is 1e-6

Both the Epsilon and the FEpsilon criteria must be met before the method is stopped

FEpsilon F-Epsilon, used in stopping criteria in the Newton-Raphson method.

Default value is 1 (in most cases that is the same as disabling the criteria)

Both the Epsilon and the FEpsilon criteria must be met before the method is stopped

Func Function to solve
MaxIter Maximum number of iterations. Default 100
NewValueAction Action to perform when a new value is calculated.
NumIter Hold the actual number of iterations for the last solve.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Solve Solves for zeros, using x as starting point and updating the value of x as a result.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also