Namespaces

Types

Type Polynomial

Namespace MathNet.Numerics

Interfaces IComparable, ICloneable

Methods

Properties

Public instance methods

void AddInplace(Polynomial polynomial)

Add anoter polynomial inplace to this polynomial.
This method operates inplace and thus alters this instance.
Parameters
Polynomial polynomial

void AddInplace(double n)

Add a real number inplace to this polynomial.
This method operates inplace and thus alters this instance.
Parameters
double n

Polynomial Clone()

Create a copy of this polynomial.
Parameters
return Polynomial

int CompareTo(Polynomial polynomial)

Compare this polynomial to another polynomial.
Parameters
return int
Polynomial polynomial

int CompareTo(object obj)

Compare this polynomial to another polynomial.
Parameters
return int
object obj

Rational Divide(Polynomial polynomial)

Divides this polynomial with anoter polynomial.
Parameters
return Rational
Polynomial polynomial

void DivideInplace(double c0)

Divides this polynomial with a real number.
This method operates inplace and thus alters this instance.
Parameters
double c0

void DivideLinearInplace(double c0, double c1, Double& reminder)

Parameters
double c0
double c1
Double& reminder

void DivideShiftInplace(int n, Double[]& reminder)

Parameters
int n
Double[]& reminder

void DivideSyntheticInplace(double a, Double& reminder)

Parameters
double a
Double& reminder

bool Equals(object obj)

Check whether this polynomial is equal to another polynomial.
Parameters
return bool
object obj

bool Equals(Polynomial polynomial)

Check whether this polynomial is equal to another polynomial.
Parameters
return bool
Polynomial polynomial

double Evaluate(double value)

Evaluates the real result of the polynomial to the given value.
Parameters
return double
double value The polynomial base, x.

double Evaluate(double value, Double& derivative)

Parameters
return double
double value
Double& derivative

Double[] Evaluate(double value, int derivativeOrderMax)

Evaluates the real result of the polynomial and its first few derivatives to the given value.
Parameters
return Double[]
double value The polynomial base, x.
int derivativeOrderMax The highest derivative order. Example: '2' evaluates the first and the second derivatives.

int GetHashCode()

Serves as a hash function for polynomials.
Parameters
return int

Type GetType()

Parameters
return Type

Polynomial Multiply(Polynomial polynomial)

Multiply two polynomials.
If both polynomials have an order > 3, the faster karatsua algorithm is used.
Parameters
return Polynomial
Polynomial polynomial

void MultiplyInplace(double c0)

Multiplies this polynomial with a real number.
This method operates inplace and thus alters this instance.
Parameters
double c0

void MultiplyLinearInplace(double c0, double c1)

Multiplies this polynomial with a linear factor c1*x+c0.
This method operates inplace and thus alters this instance.
Parameters
double c0
double c1

void MultiplyShiftInplace(int n)

Multiplies this polynomial with its base x^n, n>0, resulting in a coefficient shift.
This method operates inplace and thus alters this instance.
Parameters
int n

Polynomial MultiplySlow(Polynomial polynomial)

Multiply two small polynomials.
Parameters
return Polynomial
Polynomial polynomial

void MultiplySyntheticInplace(double a)

Multiplies this polynomial with x-a where x is its base and c0 a constant. This process is the counterpart to synthetic division.
This method operates inplace and thus alters this instance.
Parameters
double a

void NegateInplace()

Negate this polynomial inplace.
This method operates inplace and thus alters this instance.

void Normalize()

Normalizes the polynomial's order and resizes its data structure to that order.

void SubtractInplace(Polynomial polynomial)

Subtract anoter polynomial inplace from this polynomial.
This method operates inplace and thus alters this instance.
Parameters
Polynomial polynomial

void SubtractInplace(double n)

Subtract a real number inplace from this polynomial.
This method operates inplace and thus alters this instance.
Parameters
double n

string ToString(string baseVariable)

Format a human-readable string of this polynomial with the given string as base variable (e.g. "x").
Parameters
return string
string baseVariable

string ToString()

Format a human-readable string of this polynomial with "x" as base variable.
Parameters
return string

Public static methods

bool Equals(Polynomial polynomial1, Polynomial polynomial2)

Check whether two polynomials are equal.
Parameters
return bool
Polynomial polynomial1
Polynomial polynomial2

Public properties

double Item get; set;

Get/set the coefficient for the given power.
return double

int Order get;

The order of this polynomial.
return int

int Size get;

The size of the internal coefficients data structure.
return int