integrate

fun <T : Any> GaussIntegrator<T>.integrate(range: ClosedRange<Double>, order: Int = 10, intervals: Int = 10, vararg features: IntegrandFeature, function: (Double) -> T): UnivariateIntegrand<T>

Integrate using intervals segments with Gauss-Legendre rule of order order.


fun <T : Comparable<T>> PiecewisePolynomial<T>.integrate(algebra: Field<T>): PiecewisePolynomial<T>

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


fun <T : Comparable<T>> PiecewisePolynomial<T>.integrate(algebra: Field<T>, range: ClosedRange<T>): T

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

TODO use context receiver for algebra


fun <T : Any> UnivariateIntegrator<T>.integrate(vararg features: IntegrandFeature, function: (Double) -> T): UnivariateIntegrand<T>

A shortcut method to integrate a function with additional features. Range must be provided in features. The function is placed in the end position to allow passing a lambda.


fun <T : Any> UnivariateIntegrator<T>.integrate(range: ClosedRange<Double>, vararg features: IntegrandFeature, function: (Double) -> T): UnivariateIntegrand<T>

A shortcut method to integrate a function in range with additional features. The function is placed in the end position to allow passing a lambda.


fun <T : Any> UnivariateIntegrator<T>.integrate(range: ClosedRange<Double>, featureBuilder: MutableList<IntegrandFeature>.() -> Unit = {}, function: (Double) -> T): UnivariateIntegrand<T>

A shortcut method to integrate a function in range with additional features. The function is placed in the end position to allow passing a lambda.