Polynomial

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

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
@UnstableKMathAPI
fun <C, A : Ring<C>, NumericAlgebra<C>> Polynomial<C>.differentiate(ring: A): Polynomial<C>

Returns algebraic derivative of received polynomial.

Link copied to clipboard
@UnstableKMathAPI
fun <C, A : Field<C>, NumericAlgebra<C>> Polynomial<C>.integrate(ring: A): Polynomial<C>

Returns algebraic antiderivative of received polynomial.

@UnstableKMathAPI
fun <C : Comparable<C>> Polynomial<C>.integrate(ring: Field<C>, range: ClosedRange<C>): C

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.