Polynomial.From Roots Method
Definition
Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
From | Constructs a new polynomial that has the specified roots. |
From | Constructs a new polynomial that has the specified roots. |
FromRoots(Double[])
Constructs a new polynomial that has the specified
roots.
public static Polynomial FromRoots(
params double[] roots
)
Parameters
- roots Double[]
- A list of roots.
Return Value
PolynomialA polynomial with the specified roots.
Remarks
The degree of the polynomial is equal to the number of roots. You can specify the same root multiple times.
Exceptions
Argument | roots is null. |
FromRoots(ReadOnlySpan<Double>)
Constructs a new polynomial that has the specified
roots.
public static Polynomial FromRoots(
ReadOnlySpan<double> roots
)
Parameters
- roots ReadOnlySpan<Double>
- A span of roots.
Return Value
PolynomialA polynomial with the specified roots.
Remarks
The degree of the polynomial is equal to the number of roots. You can specify the same root multiple times.
Exceptions
Argument | roots is null. |