Polynomial

inline class Polynomial<T : Any>(coefficients: List<T>)

Polynomial coefficients without fixation on specific context they are applied to

Parameters

coefficients

constant is the leftmost coefficient

Constructors

Polynomial
Link copied to clipboard
common
fun <T : Any> Polynomial(coefficients: List<T>)
constant is the leftmost coefficient

Functions

equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

coefficients
Link copied to clipboard
common
val coefficients: List<T>
constant is the leftmost coefficient

Extensions

asFunction
Link copied to clipboard
common
fun <T : Any, C : Ring<T>> Polynomial<T>.asFunction(ring: C): (T) -> T
Represent the polynomial as a regular context-less function
value
Link copied to clipboard
common
fun Polynomial<Double>.value(): Double
fun <T : Any, C : Ring<T>> Polynomial<T>.value(ring: C, arg: T): T