Click or drag to resize

BairstowRootFinder Class

Class implementing Bairstows method finds roots for polynomials of degree greater than 3.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreBairstowRootFinder

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public class BairstowRootFinder

The BairstowRootFinder type exposes the following members.

Constructors
 NameDescription
Public methodBairstowRootFinder Constructs an instance with the specified tolerance an maximum iteration values.
Top
Methods
 NameDescription
Public methodStatic memberFindAllRoots(Double, Int32, Double) Finds all the roots of polynomial by repeated application of Biarstow's method.
Public methodStatic memberFindAllRoots(DoubleVector, Int32, Double) Finds all the roots of polynomial by repeated application of Biarstow's method.
Public methodStatic memberFindAllRoots(Polynomial, Int32, Double) Finds all the roots of polynomial by repeated application of Biarstow's method.
Public methodStatic memberFindUniqueRoots(IListBairstowRootFinderSolveResult, Double) Extracts the unique roots from the list of all roots resulting from Applying Bairstow's method to find all roots of a polynomial. Equality is determined by the "relative error" between the two values, x and y, being compared according to the formula: E = ||x - y||, if max(||x||, ||y||) is less than 1 ||x - y|| / max(||x||, ||y||), otherwise
Public methodStatic memberFindUniqueRoots(Double, Int32, Double) Finds the unique roots of a polynomial P(x) = a[0] + a[1]*x + a[2]*x^2 + ... + a[n]*x^n using repeated application of Bairstow's method.
Public methodStatic memberFindUniqueRoots(DoubleVector, Int32, Double) Finds the unique roots of a polynomial P(x) = a[0] + a[1]*x + a[2]*x^2 + ... + a[n]*x^n using repeated application of Bairstow's method.
Public methodStatic memberFindUniqueRoots(Polynomial, Int32, Double) Finds the unique roots of a polynomial using repeated application of Bairstow's method.
Public methodSolve(Double) Solves the polynomial P(x) = a[0] + a[1]*x + a[2]*x^2 + ... + a[n]*x^n Note that the constant term is at index 0 and the leading coefficient is at index
C#
a.Length - 1
.
Public methodSolve(DoubleVector) Solves the polynomial P(x) = a[0] + a[1]*x + a[2]*x^2 + ... + a[n]*x^n Note that the constant term is at index 0 and the leading coefficient is at index
C#
a.Length - 1
.
Public methodSolve(Polynomial) Solves the give polynomial.
Top
Fields
 NameDescription
Public fieldMaxIterations The maximum number of iterations performed.
Public fieldSmall Number for determining if a value is approximately zero. The algorithm will consider a number x to be zero if the absolute value of x is less than
C#
Small
Default value is 1e-13.
Public fieldTolerance Iteration terminates with a converged status if the step length falls below this value. In moving from iterative step n to n + 1, the step length is defined as StepLength = sqrt((u(n) - u(n+1))^2 + (v(n) - v(n+1))^2) where un and vn are the coefficients in the quadratic x^2 + u(n)*x + v(n) at the nth step.
Top
Remarks
Given a polynomial P(x) = a0 + a1*x + a2*x^2 + ... + an*x^n Bairstows method iteratively adjusts coefficients u and v so that the quadratic x^2 + u*x + v has the same roots as P(x). These roots are then found using the quadratic formula.
See Also