Click or drag to resize

SecantRootFinder Class

Class SecantRootFinder finds roots of univariate functions using the secant method.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
[SerializableAttribute]
public class SecantRootFinder : RootFinderBase, 
	IOneVariableRootFinder, ICloneable

The SecantRootFinder type exposes the following members.

Constructors
  NameDescription
Public methodSecantRootFinder
Constructs a SecantRootFinder instances with default tolerance and default maximum iterations.
Public methodSecantRootFinder(Double)
Constructs a SecantRootFinder instance with the given error tolerance.
Public methodSecantRootFinder(Int32)
Constructs a SecantRootFinder instance with the given maximum number of iterations.
Public methodSecantRootFinder(Double, Int32)
Constructs a SecantRootFinder instance with the given error tolerance and maximum number of iterations.
Top
Properties
  NameDescription
Public propertyError
Gets the error associated with the root just computed.
(Inherited from RootFinderBase.)
Public propertyIterations
Gets the number of iterations used computing the last root.
(Inherited from RootFinderBase.)
Public propertyMaxIterations
Gets and sets the maximum number of iterations used in finding roots.
(Inherited from RootFinderBase.)
Public propertyMaxIterationsMet
Returns true if the root just computed stopped because the maximum number of iterations was reached; otherwise, false.
(Inherited from RootFinderBase.)
Public propertyTolerance
Gets and sets the error tolerance used in finding roots.
(Inherited from RootFinderBase.)
Public propertyToleranceMet
Returns true if the root just computed stopped because the error tolerance was reached; otherwise, false.
(Inherited from RootFinderBase.)
Top
Methods
  NameDescription
Public methodBracketRoot
Attempts to bracket a root given the function and an initial guess near a suspected root.
(Inherited from RootFinderBase.)
Public methodClone
Creates a deep copy of this root finder.
(Overrides RootFinderBaseClone.)
Public methodFind(OneVariableFunction, Interval)
Finds a root of the given function within the given interval.
Public methodFind(OneVariableFunction, Double, Double)
Finds a root of the given function within the given interval.
Top
Fields
  NameDescription
Protected fielderror_
The current error.
(Inherited from RootFinderBase.)
Protected fielditer_
The current number of iterations performed.
(Inherited from RootFinderBase.)
Protected fieldmax_
The maximum number of iterations.
(Inherited from RootFinderBase.)
Protected fieldtolerance_
The error tolerance.
(Inherited from RootFinderBase.)
Top
Remarks
The secant method assumes that the function is approximately linear in the local region of interest and uses the zero-crossing of the line connecting the limits of the interval as an estimate of the root. The function is evaluated at the estimate, a new line is formed, and the process is repeated.
See Also