Polynomial

data class Polynomial<out C>(val coefficients: List<C>)(source)

Represents univariate polynomial that stores its coefficients in a List.

Parameters

C

the type of constants.

Constructors

Link copied to clipboard
constructor(coefficients: List<C>)

Functions

Link copied to clipboard
fun <C, A : Ring<C>> Polynomial<C>.asFunctionOver(ring: A): (C) -> C

Represent this polynomial as a regular context-less function.

Link copied to clipboard

Returns algebraic derivative of received polynomial.

Link copied to clipboard

Returns algebraic antiderivative of received polynomial.

Computes a definite integral of this polynomial in the specified range.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Evaluates value of this Double polynomial on provided Double argument.

fun <C> Polynomial<C>.value(ring: Ring<C>, arg: C): C

Evaluates value of this polynomial on provided argument.

Properties

Link copied to clipboard

List that contains coefficients of the polynomial.