class

Num::Polynomial(T)

Inherits Reference < Object

Constructors

new(coeffs : Array(T))
Source

Instance methods

*(other : Polynomial(T)) : Polynomial(T)

Multiply two polynomials

Source
+(other : Polynomial(T)) : Polynomial(T)

Add two polynomials

Source
coeffs
Source
degree
Source
derivative

Compute derivative of polynomial

Source
eval(x : Tensor(T, S)) : Tensor(T, S) forall S

Evaluate polynomial at a Tensor x using Horner's method

Source
eval(x : T) : T

Evaluate polynomial at a scalar value x using Horner's method

Source