asFunction

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

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(source)

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