Coefficients Type

Polynomial coefficients with various properties are stored within this type.

Constructors

Constructor Description

Coefficients(coefficients)

Full Usage: Coefficients(coefficients)

Parameters:
Returns: Coefficients
coefficients : vector
Returns: Coefficients

Instance members

Instance member Description

this.Coefficients

Full Usage: this.Coefficients

Returns: vector

Contains polynomial coefficients as vector in the form of [constant; linear; quadratic; cubic].

Returns: vector

this.Constant

Full Usage: this.Constant

Returns: float

Constant (first-degree) coefficient of the polynomial a + bx + cx^2 + dx^3 .. --> a

Returns: float

this.Count

Full Usage: this.Count

Returns: int

Number of polynomial coefficients (degree + 1).

Returns: int

this.Cubic

Full Usage: this.Cubic

Returns: float

Cubic (fourth-degree) coefficient of the polynomial a + bx + cx^2 + dx^3 .. --> d

Returns: float

this.Degree

Full Usage: this.Degree

Returns: int

Polynomial degree of the polynomial (coefficient count - 1)

Returns: int

this[degree]

Full Usage: this[degree]

Parameters:
    degree : int

Returns: float

Get coefficient of specified degree term.

degree : int
Returns: float

this.Leading

Full Usage: this.Leading

Returns: float

Highest degree coefficient

Returns: float

this.Linear

Full Usage: this.Linear

Returns: float

Linear (second-degree) coefficient of the polynomial a + bx + cx^2 + dx^3 .. --> b

Returns: float

this.Predict

Full Usage: this.Predict

Parameters:
Returns: float

Gets a x value vector and predicts the corresponding y value for the given polynomial coefficients.

x : vector
Returns: float

this.Predict

Full Usage: this.Predict

Parameters:
    x : float

Returns: float

Gets a x value and predicts the corresponding y value for the given polynomial coefficients.

x : float
Returns: float

this.Quadratic

Full Usage: this.Quadratic

Returns: float

Quadratic (third-degree) coefficient of the polynomial a + bx + cx^2 + dx^3 .. --> c

Returns: float

this.getCoefficient degree

Full Usage: this.getCoefficient degree

Parameters:
    degree : int

Returns: float

Get coefficient of specified degree term.

degree : int
Returns: float

Static members

Static member Description

Coefficients.Empty()

Full Usage: Coefficients.Empty()

Returns: Coefficients

Initializes Coefficients type with an empty vector.

Returns: Coefficients

Coefficients.Init(coefficients)

Full Usage: Coefficients.Init(coefficients)

Parameters:
Returns: Coefficients
coefficients : vector
Returns: Coefficients