PiecewisePolynomial

Represents piecewise-defined function where all the sub-functions are polynomials.

Functions

Link copied to clipboard
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.

Link copied to clipboard
abstract override fun findPiece(arg: T): Polynomial<T>?

Returns the appropriate sub-function for given piece key.

Link copied to clipboard

Compute analytical indefinite integral of this PiecewisePolynomial, keeping all intervals intact

Compute definite integral of given PiecewisePolynomial piece by piece in a given range Requires UnivariateIntegrationNodes or IntegrationRange and IntegrandMaxCalls

Link copied to clipboard
fun <T : Comparable<T>, C : Ring<T>> PiecewisePolynomial<T>.value(ring: C, arg: T): T?

Return a value of polynomial function with given ring a given arg or null if argument is outside piecewise definition.

Properties

Link copied to clipboard

An ordered list of range-polynomial pairs. The list does not in general guarantee that there are no "holes" in it.