Polynomial Class |
[SerializableAttribute] public class Polynomial : IFormattable, IEquatable<Polynomial>, ICloneable
The Polynomial type exposes the following members.
Name | Description | |
---|---|---|
Polynomial | Create a zero-polynomial | |
Polynomial(Double) | Create a constant polynomial. Example: 3.0 -> "p : x -> 3.0" | |
Polynomial(Double) | Create a polynomial with the provided coefficients (in ascending order, where the index matches the exponent). Example: {5, 0, 2} -> "p : x -> 5 + 0 x^1 + 2 x^2". | |
Polynomial(IEnumerableDouble) | Create a polynomial with the provided coefficients (in ascending order, where the index matches the exponent). Example: {5, 0, 2} -> "p : x -> 5 + 0 x^1 + 2 x^2". | |
Polynomial(Int32) | Create a zero-polynomial with a coefficient array of the given length. An array of length N can support polynomials of a degree of at most N-1. |
Name | Description | |
---|---|---|
Coefficients | The coefficients of the polynomial in a | |
Degree | Degree of the polynomial, i.e. the largest monomial exponent. For example, the degree of y=x^2+x^5 is 5, for y=3 it is 0. The null-polynomial returns degree -1 because the correct degree, negative infinity, cannot be represented by integers. | |
Zero |
Name | Description | |
---|---|---|
Add(Polynomial, Polynomial) | Addition of two Polynomials (point-wise). | |
Add(Polynomial, Double) | Addition of a polynomial and a scalar. | |
Clone | ||
Differentiate | ||
Divide | Scales a polynomial by division by a scalar | |
DivideRemainder(Polynomial) | Division of two polynomials returning the quotient-with-remainder of the two polynomials given | |
DivideRemainder(Polynomial, Polynomial) | Euclidean long division of two polynomials, returning the quotient q and remainder r of the two polynomials a and b such that a = q*b + r | |
EigenvalueMatrix | Get the eigenvalue matrix A of this polynomial such that eig(A) = roots of this polynomial. | |
Equals(Object) | (Overrides ObjectEquals(Object)) | |
Equals(Polynomial) | ||
Evaluate(Complex) | Evaluate a polynomial at point x. | |
Evaluate(Double) | Evaluate a polynomial at point x. | |
Evaluate(IEnumerableDouble) | Evaluate a polynomial at points z. | |
Evaluate(IEnumerableComplex) | Evaluate a polynomial at points z. | |
Evaluate(Complex, Double) | Evaluate a polynomial at point x. Coefficients are ordered ascending by power with power k at index k. Example: coefficients [3,-1,2] represent y=2x^2-x+3. | |
Evaluate(Complex, Complex) | Evaluate a polynomial at point x. Coefficients are ordered ascending by power with power k at index k. Example: coefficients [3,-1,2] represent y=2x^2-x+3. | |
Evaluate(Double, Double) | Evaluate a polynomial at point x. Coefficients are ordered ascending by power with power k at index k. Example: coefficients [3,-1,2] represent y=2x^2-x+3. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
Fit | Least-Squares fitting the points (x,y) to a k-order polynomial y : x -> p0 + p1*x + p2*x^2 + ... + pk*x^k | |
GetHashCode | (Overrides ObjectGetHashCode) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
Integrate | ||
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
Multiply(Polynomial, Polynomial) | Multiplies a polynomial by a polynomial (convolution) | |
Multiply(Polynomial, Double) | Scales a polynomial by a scalar | |
Negate | Negation of a polynomial. | |
PointwiseDivide | Point-wise division of two Polynomials | |
PointwiseMultiply | Point-wise multiplication of two Polynomials | |
Roots | Calculates the complex roots of the Polynomial by eigenvalue decomposition | |
Subtract(Double, Polynomial) | Addition of a polynomial from a scalar. | |
Subtract(Polynomial, Polynomial) | Subtraction of two Polynomials (point-wise). | |
Subtract(Polynomial, Double) | Addition of a scalar from a polynomial. | |
ToString |
Format the polynomial in ascending order, e.g. "4.3 + 2.0x^2 - x^3".
(Overrides ObjectToString) | |
ToString(IFormatProvider) | Format the polynomial in ascending order, e.g. "4.3 + 2.0x^2 - x^3". | |
ToString(String) | Format the polynomial in ascending order, e.g. "4.3 + 2.0x^2 - x^3". | |
ToString(String, IFormatProvider) | Format the polynomial in ascending order, e.g. "4.3 + 2.0x^2 - x^3". | |
ToStringDescending | Format the polynomial in descending order, e.g. "x^3 + 2.0x^2 - 4.3". | |
ToStringDescending(IFormatProvider) | Format the polynomial in descending order, e.g. "x^3 + 2.0x^2 - 4.3". | |
ToStringDescending(String) | Format the polynomial in descending order, e.g. "x^3 + 2.0x^2 - 4.3". | |
ToStringDescending(String, IFormatProvider) | Format the polynomial in descending order, e.g. "x^3 + 2.0x^2 - 4.3". |
Name | Description | |
---|---|---|
Addition(Double, Polynomial) | adds a scalar to a polynomial. | |
Addition(Polynomial, Polynomial) | Addition of two Polynomials (piecewise) | |
Addition(Polynomial, Double) | adds a scalar to a polynomial. | |
Division(Polynomial, Double) | Divides a polynomial by scalar value. | |
Multiply(Double, Polynomial) | Multiplies a polynomial by a scalar. | |
Multiply(Polynomial, Polynomial) | Multiplies a polynomial by a polynomial (convolution). | |
Multiply(Polynomial, Double) | Multiplies a polynomial by a scalar. | |
Subtraction(Double, Polynomial) | Subtracts a polynomial from a scalar. | |
Subtraction(Polynomial, Polynomial) | Subtraction of two polynomial. | |
Subtraction(Polynomial, Double) | Subtracts a scalar from a polynomial. | |
UnaryNegation(Polynomial) | Negates a polynomial. |
Name | Description | |
---|---|---|
VariableName | Only needed for the ToString method |