 | BairstowRootFinderFindUniqueRoots Method (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.
Namespace:
CenterSpace.NMath.Core
Assembly:
NMath (in NMath.dll) Version: 7.4
Syntaxpublic static ICollection<DoubleComplex> FindUniqueRoots(
double[] a,
int maxIterations = 100,
double tolerance = 1E-12
)
Public Shared Function FindUniqueRoots (
a As Double(),
Optional maxIterations As Integer = 100,
Optional tolerance As Double = 1E-12
) As ICollection(Of DoubleComplex)
public:
static ICollection<DoubleComplex>^ FindUniqueRoots(
array<double>^ a,
int maxIterations = 100,
double tolerance = 1E-12
)
static member FindUniqueRoots :
a : float[] *
?maxIterations : int *
?tolerance : float
(* Defaults:
let _maxIterations = defaultArg maxIterations 100
let _tolerance = defaultArg tolerance 1E-12
*)
-> ICollection<DoubleComplex>
Parameters
- a
- Type: SystemDouble
The coefficients of the polynomial to solve.
The constant term is at index 0 and the leading coefficient
is at index . The leading coefficient cannot
be zero. - maxIterations (Optional)
- Type: SystemInt32
Maximum number of iterations to perform during an application
of Bairstow's method. - tolerance (Optional)
- Type: SystemDouble
Iteration in Bairstow's method terminates
if falls below this value.
Return Value
Type:
ICollectionDoubleComplexThe set of unique roots.
See Also