SimpsonIntegrator

@UnstableKMathAPI
class SimpsonIntegrator<T : Any>(val algebra: Field<T>) : Integrator<UnivariateIntegrand<T>>

Use double pass Simpson rule integration with a fixed number of points. Requires UnivariateIntegrandRanges or IntegrationRange and IntegrandMaxCalls.

  • IntegrationRange—the univariate range of integration. By default, uses 0..1 interval.

  • IntegrandMaxCalls—the maximum number of function calls during integration. For non-iterative rules, always uses the maximum number of points. By default, uses 10 points.

Constructors

Link copied to clipboard
constructor(algebra: Field<T>)

Functions

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

@UnstableKMathAPI
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.

@UnstableKMathAPI
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.

Link copied to clipboard
open override fun process(integrand: UnivariateIntegrand<T>): UnivariateIntegrand<T>

Runs one integration pass and return a new Integrand with a new set of features.

Properties

Link copied to clipboard
val algebra: Field<T>