Represents a polynomial.

Namespace: Extreme.Mathematics.Curves
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Class Polynomial _
	Inherits PolynomialBase
C#
public class Polynomial : PolynomialBase
C++
public ref class Polynomial : public PolynomialBase

Methods

IconTypeDescription
Add(Double, LinearCombination)
Adds a multiple of another LinearCombination to this instance.
static memberAdd(Polynomial, Polynomial)
Adds two polynomials.
Add(LinearCombination)
Adds another LinearCombination to this instance.
static memberAddition(Polynomial, Polynomial)
Adds two polynomials.
Clone()
Constructs an exact copy of this instance.
ComplexSlopeAt(DoubleComplex)
Evaluates the slope or first derivative of a polynomial for a DoubleComplex argument.
ComplexValueAt(DoubleComplex)
Evaluates the polynomial for a DoubleComplex argument.
Deflate(Double)
Deflates a polynomial by dividing out a root.
static memberDivide(Polynomial, Polynomial, Polynomial)
Divides one Polynomial by another.
static memberDivide(Polynomial, Polynomial)
Divides one Polynomial by another.
static memberDivision(Polynomial, Polynomial)
Divides one Polynomial by another.
static memberEquality(Polynomial, Polynomial)
Compares two Polynomial objects for equality.
Equals(Object)
Overridden. Returns a value indicating whether this instance is equal to a specified object.
static memberEquals(Polynomial, Polynomial)
Returns a value indicating whether two Polynomial objects represent the same value.
Finalize()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
FindComplexRoots()
Gets the set of roots of the Polynomial.
FindRoots()
Gets the set of X-coordinates where the Polynomial crosses the X-axis.
static memberFromRoots(Double[]())
Constructs a new polynomial that has the specified roots.
GetCurveFitter()
Returns a CurveFitter object that can be used to fit the curve to data.
GetDerivative()
Returns a Curve of type Polynomial that represents the derivative of this Polynomial.
GetHashCode()
Overridden. Returns the hash code for this instance.
static memberGetInterpolatingPolynomial(Double[](), Double[]())
Constructs the interpolating polynomial through a set of points.
GetType()
Gets the Type of the current instance.
static memberInequality(Polynomial, Polynomial)
Compares two Polynomial objects for inequality.
Integral(Double, Double)
Gets the definite integral of the curve between the specified X-coordinates.
static memberLeastSquaresFit(Double[](), Double[](), Int32, Double[]())
Returns the Polynomial that is the best weighted least squares fit through the given set of points.
static memberLeastSquaresFit(Double[](), Double[](), Int32)
Returns the Polynomial that is the best least squares fit through the given set of points.
MemberwiseClone()
Creates a shallow copy of the current Object.
static memberModulus(Polynomial, Polynomial)
Divides one Polynomial by another and returns the remainder.
static memberModulus(Polynomial, Polynomial)
Divides one Polynomial by another and returns the remainder.
static memberMultiply(Polynomial, Polynomial)
Multiplies two polynomials.
static memberMultiply(Polynomial, Polynomial)
Multiplies two polynomials.
OnParameterChanged(Int32, Double)
Called when a coefficient of the polynomial is changed.
OnParameterChanging(Int32, Double)
Called before the value of a curve parameter is changed.
Reduce()
Reduces the degree of a polynomial so that the leading coefficient is different from zero.
Reduce(Double)
Reduces the degree of a polynomial so that the leading coefficient is greater than the specified tolerance.
SlopeAt(Double)
Evaluates the slope or first derivative of a polynomial for a real argument.
static memberSubtract(Polynomial, Polynomial)
Subtracts two polynomials.
Subtract(LinearCombination)
Subtracts another LinearCombination from this instance.
static memberSubtraction(Polynomial, Polynomial)
Subtracts two polynomials.
TangentAt(Double)
Gets the tangent Line to the curve at the specified X-coordinate.
ToString()
Returns a string representation of this instance.
ValueAt(Double)
Evaluates the polynomial for a real argument.

Constructors

IconTypeDescription
PolynomialNew(Int32)
Constructs a new polynomial of the specified degree.
PolynomialNew(Double[]())
Constructs a new polynomial with the specified coefficients.
PolynomialNew(Vector)
Constructs a new polynomial with the specified coefficients.

Properties

IconTypeDescription
Basis
Gets the function basis for the polynomial.
Coefficient(Int32)
Gets or sets the coefficient of the function with the specified index.
Degree
Gets the degree of the polynomial.
Item(Int32)
Gets or sets the coefficient of the function with the specified index.
Parameters
Gets the collection of parameters that determine the shape of this Curve.

Remarks

Use the Polynomial class to represent ordinary polynomials. A polynomial is an algebraic expression consisting of one or more summed terms, each term consisting of a constant multiplier and a variable raised to an integral exponent. It inherits from Curve and provides specialized implementation for most methods.

The parameters of a Polynomial correspond to the coefficients of the polynomial. The coefficients can be accessed through the indexed Coefficient(Int32) property. In C#, this property is the indexer for this class.

The ValueAt(Double) method returns the value of the polynomial at a specific point. SlopeAt(Double) returns the derivative of the Line. Integral(Double, Double) evaluates the definite integral over a specified interval.

The FindRoots() method attempts to find all real roots of the polynomial. It returns a Double array. The corresponding FindComplexRoots() method attempts to find all complex roots, and returns them as an array of DoubleComplex values. The roots are sorted in order of ascending real part.

Methods for arithmetic operations on polynomials have been defined. Corresponding operator overloads are available for those languages that support them.

Inheritance Hierarchy