Click or drag to resize

Polynomial Class

Class Polynomial represents a polynomial function as a vector of coefficients.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreOneVariableFunction
    CenterSpace.NMath.CorePolynomial

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class Polynomial : OneVariableFunction, ISerializable

The Polynomial type exposes the following members.

Constructors
 NameDescription
Public methodPolynomial Constructs the zero polynomial, that is, the polynomial, p(x), that satisfies p(x) = 0 for all x.
Public methodPolynomial(Double) Constructs a Polynomial instance with the given coefficients.
Public methodPolynomial(DoubleVector) Constructs a Polynomial instance with the given coefficients.
Public methodPolynomial(DoubleVector, DoubleVector) Constructs a polynomial which passes through the given set of points.
Public methodPolynomial(DoubleVector, OneVariableFunction) Construct a polynomial that interpolates a function. If the number of interpolation points is n, then the constructed polynomial, p(x), will be have degree n - 1 and agree with the passed function at the passed interpolation points. Specifically, p will satisfy p(interpolationPoints[i]) = function(interpolationPoints[i]) for each i = 0, 1,...,n.
Public methodPolynomial(SerializationInfo, StreamingContext) Constructs a Polynomial instance from serialization information.
Top
Properties
 NameDescription
Public propertyCoeff Gets and sets the cofficients of this polynomial.
Public propertyDegree Gets the degree of the polynomial encapsulated by this object.
Public propertyDifferentiator Gets and sets the differentiation method object associated with this function.
(Inherited from OneVariableFunction)
Public propertyFunc Gets the function encapsulated by this object.
(Inherited from OneVariableFunction)
Public propertyIntegrator Gets and sets the integration method object associated with this function.
(Inherited from OneVariableFunction)
Top
Methods
 NameDescription
Public methodStatic memberAdd(Double, Polynomial) Adds a polynomial and a scalar.
Public methodStatic memberAdd(Polynomial, Polynomial) Adds two polynomials.
Public methodStatic memberAdd(Polynomial, Double) Adds a polynomial and a scalar.
Public methodAntiDerivative Returns the anti-derivative (indefinite integral) of this polynomial.
Public methodClone Creates a deep copy of this polynomial.
(Overrides OneVariableFunctionClone)
Public methodDerivative Returns the first derivative of this polynomial.
Public methodDifferentiate Computes the numerical derivative of the current function at the given x-value.
(Inherited from OneVariableFunction)
Public methodStatic memberDivide Divides a polynomial by a scalar.
Public methodEquals Tests for equality of this polynomial and another polynomial. Two polynomials are equal if their coefficient vectors have the same dimensions and all values are equal.
(Overrides ObjectEquals(Object))
Public methodEvaluate(Double) Evaluates the current function at the given x-value.
(Inherited from OneVariableFunction)
Public methodEvaluate(DoubleVector) Evaluates the current function at the given set of x-values.
(Inherited from OneVariableFunction)
Public methodEvaluate(OneVariableFunction) Creates a composite function.
(Inherited from OneVariableFunction)
Public methodEvaluateComplex Evaluates the current function at the given complex x-value.
Protected methodEvaluatePoly Evaluates the current function at the given x-value.
Public methodGetHashCode Returns an integer hash code for this polynomial.
(Overrides ObjectGetHashCode)
Public methodGetObjectData Implemented as part of the ISerializable interface. Serializes self to a stream.
Public methodIntegrate Computes the integral of the current function over the specified interval.
(Inherited from OneVariableFunction)
Public methodStatic memberMultiply(Double, Polynomial) Multiplies a polynomial and a scalar.
Public methodStatic memberMultiply(Polynomial, Polynomial) Multiplies two polynomials.
Public methodStatic memberMultiply(Polynomial, Double) Multiplies a scalar and a polynomial.
Public methodStatic memberNegate Negates a polynomial.
Public methodStatic memberPolynomialDivide Divides two polynomials to yield quotient and remainder Polynomials.
Public methodReduce Removes trailing zeros from the coefficient vector.
Public methodStatic memberSubtract(Double, Polynomial) Subtracts a polynomial from a scalar.
Public methodStatic memberSubtract(Polynomial, Polynomial) Subtracts a polynomial from a polynomial.
Public methodStatic memberSubtract(Polynomial, Double) Subtracts a scalar from a polynomial.
Public methodCode exampleToString Returns a formatted string representation of this polynomial.
(Overrides ObjectToString)
Public methodCode exampleToString(String) Returns a formatted string representation of this polynomial using specified numeric format.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Double, Polynomial) Adds a scalar and a polynomial.
Public operatorStatic memberAddition(Polynomial, Polynomial) Adds two polynomials.
Public operatorStatic memberAddition(Polynomial, Double) Adds a polynomial and a scalar.
Public operatorStatic memberDivision(Polynomial, Double) Divides a polynomial by a scalar.
Public operatorStatic memberEquality(Polynomial, Polynomial) Tests for equality of two polynomials. Two polynomials are equal if their coefficient vector have the same dimensions and all values are equal.
Public operatorStatic memberInequality(Polynomial, Polynomial) Tests for inequality of two polynomials. Two polynomials are unequal if their coefficient vectors have different dimensions or their values are not all equal.
Public operatorStatic memberMultiply(Double, Polynomial) Multiplies a scalar and a polynomial.
Public operatorStatic memberMultiply(Polynomial, Polynomial) Multiplies two polynomials.
Public operatorStatic memberMultiply(Polynomial, Double) Multiplies a polynomial and a scalar.
Public operatorStatic memberSubtraction(Double, Polynomial) Adds a polynomial from a scalar.
Public operatorStatic memberSubtraction(Polynomial, Polynomial) Subtracts a polynomial from another polynomial.
Public operatorStatic memberSubtraction(Polynomial, Double) Subtracts a scalar from a polynomial.
Public operatorStatic memberUnaryNegation(Polynomial) Negates the polynomial.
Top
Fields
 NameDescription
Protected fielddifferentiator_Differentiator
(Inherited from OneVariableFunction)
Protected fieldfunction_ Captured function
(Inherited from OneVariableFunction)
Protected fieldintegrator_Integrator
(Inherited from OneVariableFunction)
Top
See Also