asFunction

fun <T : Comparable<T>, C : Ring<T>> PiecewisePolynomial<T>.asFunction(ring: C): (T) -> T?

Convert this polynomial to a function returning nullable value (null if argument is outside piecewise range).

fun <T : Comparable<T>, C : Ring<T>> PiecewisePolynomial<T>.asFunction(ring: C, defaultValue: T): (T) -> T

Convert this polynomial to a function using defaultValue for arguments outside the piecewise range.

fun <T, C : Ring<T>> Polynomial<T>.asFunction(ring: C): (T) -> T

Represent the polynomial as a regular context-less function.