PolynomialSpace

Arithmetic context for univariate polynomials with coefficients stored as a List constructed with the provided ring of constants.

Parameters

C

the type of constants. Polynomials have them a coefficients in their terms.

A

type of provided underlying ring of constants. It's Ring of C.

ring

underlying ring of constants of type A.

Constructors

Link copied to clipboard
constructor(ring: A)

Functions

Link copied to clipboard
open override fun add(left: Polynomial<C>, right: Polynomial<C>): Polynomial<C>
Link copied to clipboard
inline fun Polynomial<C>.asFunction(): (C) -> C

Represent this polynomial as a regular context-less function.

Link copied to clipboard

Converts the constant to polynomial.

Link copied to clipboard
open fun binaryOperation(operation: String, left: Polynomial<C>, right: Polynomial<C>): Polynomial<C>
Link copied to clipboard
open override fun binaryOperationFunction(operation: String): (left: Polynomial<C>, right: Polynomial<C>) -> Polynomial<C>
Link copied to clipboard
open fun bindSymbol(value: String): Polynomial<C>
Link copied to clipboard
open fun bindSymbolOrNull(value: String): Polynomial<C>?
Link copied to clipboard
open operator fun Polynomial<C>.div(k: Number): Polynomial<C>
Link copied to clipboard
open fun export(arg: Polynomial<C>): Polynomial<C>
Link copied to clipboard
inline operator fun Polynomial<C>.invoke(argument: C): C

Evaluates value of this polynomial on provided argument.

Link copied to clipboard
operator fun C.minus(other: Polynomial<C>): Polynomial<C>
operator fun Polynomial<C>.minus(other: C): Polynomial<C>

Returns difference between the constant represented as a polynomial and the polynomial.

open operator override fun Polynomial<C>.minus(other: Polynomial<C>): Polynomial<C>

Returns difference of the polynomials.

Link copied to clipboard
open override fun multiply(left: Polynomial<C>, right: Polynomial<C>): Polynomial<C>
Link copied to clipboard
fun number(value: C): Polynomial<C>

Converts the constant value to polynomial.

Link copied to clipboard
operator fun C.plus(other: Polynomial<C>): Polynomial<C>
operator fun Polynomial<C>.plus(other: C): Polynomial<C>

Returns sum of the constant represented as a polynomial and the polynomial.

open operator override fun Polynomial<C>.plus(other: Polynomial<C>): Polynomial<C>

Returns sum of the polynomials.

Link copied to clipboard
open fun power(arg: Polynomial<C>, pow: UInt): Polynomial<C>
Link copied to clipboard
open override fun scale(a: Polynomial<C>, value: Double): Polynomial<C>
Link copied to clipboard
inline fun Polynomial<C>.substitute(argument: C): C

Evaluates value of this polynomial on provided argument.

Link copied to clipboard
operator fun C.times(other: Polynomial<C>): Polynomial<C>
operator fun Polynomial<C>.times(other: C): Polynomial<C>

Returns product of the constant represented as a polynomial and the polynomial.

open operator override fun Polynomial<C>.times(other: Polynomial<C>): Polynomial<C>

Returns product of the polynomials.

open operator fun Number.times(arg: Polynomial<C>): Polynomial<C>
open operator fun Polynomial<C>.times(k: Number): Polynomial<C>
Link copied to clipboard
open operator override fun Polynomial<C>.unaryMinus(): Polynomial<C>

Returns negation of the polynomial.

Link copied to clipboard
open fun unaryOperation(operation: String, arg: Polynomial<C>): Polynomial<C>
Link copied to clipboard
open override fun unaryOperationFunction(operation: String): (arg: Polynomial<C>) -> Polynomial<C>
Link copied to clipboard
open operator fun Polynomial<C>.unaryPlus(): Polynomial<C>

Properties

Link copied to clipboard
Link copied to clipboard

Instance of unit constant (unit of the underlying ring).

Link copied to clipboard

Instance of zero constant (zero of the underlying ring).

Link copied to clipboard

Degree of the polynomial, see also. If the polynomial is zero, degree is -1.

Link copied to clipboard
open override val one: Polynomial<C>

Instance of unit polynomial (unit of the polynomial ring).

Link copied to clipboard
val ring: A

Underlying ring of constants. Its operations on constants are used by local operations on constants and polynomials.

Link copied to clipboard
open override val zero: Polynomial<C>

Instance of zero polynomial (zero of the polynomial ring).