Package space.kscience.kmath.integration

Types

DoubleSimpsonIntegrator
Link copied to clipboard
object DoubleSimpsonIntegrator : Integrator<UnivariateIntegrand<Double>>
Use double pass Simpson rule integration with a fixed number of points.
DoubleSplineIntegrator
Link copied to clipboard
A simplified double-based spline-interpolation-based analytic integration
  • IntegrationRange&mdash;the univariate range of integration. By default, uses 0.0..1.0 interval.

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

GaussIntegrator
Link copied to clipboard
class GaussIntegrator<T : Any>(algebra: Field<T>) : Integrator<UnivariateIntegrand<T>>
A simple one-pass integrator based on Gauss rule Following integrand features are accepted:
GaussIntegratorRuleFactory
Link copied to clipboard
interface GaussIntegratorRuleFactory : IntegrandFeature
GaussLegendreRuleFactory
Link copied to clipboard
object GaussLegendreRuleFactory : GaussIntegratorRuleFactory
Gauss integrator rule based ont Legendre polynomials.
Integrand
Link copied to clipboard
interface Integrand : Featured<IntegrandFeature>
IntegrandAbsoluteAccuracy
Link copied to clipboard
class IntegrandAbsoluteAccuracy(accuracy: Double) : IntegrandFeature
IntegrandCallsPerformed
Link copied to clipboard
class IntegrandCallsPerformed(calls: Int) : IntegrandFeature
IntegrandFeature
Link copied to clipboard
interface IntegrandFeature : Feature<IntegrandFeature>
IntegrandIterationsRange
Link copied to clipboard
class IntegrandIterationsRange(range: IntRange) : IntegrandFeature
IntegrandMaxCalls
Link copied to clipboard
class IntegrandMaxCalls(maxCalls: Int) : IntegrandFeature
IntegrandRelativeAccuracy
Link copied to clipboard
class IntegrandRelativeAccuracy(accuracy: Double) : IntegrandFeature
IntegrandValue
Link copied to clipboard
class IntegrandValue<out T : Any>(value: T) : IntegrandFeature
IntegrationRange
Link copied to clipboard
class IntegrationRange(range: ClosedRange<Double>) : IntegrandFeature
Integrator
Link copied to clipboard
interface Integrator<I : Integrand>
A general interface for all integrators.
MultivariateIntegrand
Link copied to clipboard
class MultivariateIntegrand<T : Any> : Integrand
SimpsonIntegrator
Link copied to clipboard
class SimpsonIntegrator<T : Any>(algebra: Field<T>) : Integrator<UnivariateIntegrand<T>>
Use double pass Simpson rule integration with a fixed number of points.
SplineIntegrator
Link copied to clipboard
class SplineIntegrator<T : Comparable<T>>(algebra: Field<T>, bufferFactory: MutableBufferFactory<T>) : Integrator<UnivariateIntegrand<T>>
A generic spline-interpolation-based analytic integration
  • IntegrationRange&mdash;the univariate range of integration. By default, uses 0..1 interval.

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

UnivariateIntegrand
Link copied to clipboard
class UnivariateIntegrand<T> : Integrand
UnivariateIntegrandRanges
Link copied to clipboard
class UnivariateIntegrandRanges(ranges: List<Pair<ClosedRange<Double>, Int>>) : IntegrandFeature
Set of univariate integration ranges.
UnivariateIntegrationNodes
Link copied to clipboard
class UnivariateIntegrationNodes(nodes: Buffer<Double>) : IntegrandFeature
UnivariateIntegrator
Link copied to clipboard
typealias UnivariateIntegrator<T> = Integrator<UnivariateIntegrand<T>>

Functions

build
Link copied to clipboard
fun GaussIntegratorRuleFactory.build(numPoints: Int, range: ClosedRange<Double>): Pair<Buffer<Double>, Buffer<Double>>
Create an integration rule by scaling existing normalized rule
getFeature
Link copied to clipboard
inline fun <T : IntegrandFeature> Integrand.getFeature(): T?
integrate
Link copied to clipboard
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
fun <T : Any> UnivariateIntegrator<T>.integrate(vararg features: IntegrandFeature, function: (Double) -> T): UnivariateIntegrand<T>
A shortcut method to integrate a function with additional features.
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.
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.
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.
MultivariateIntegrand
Link copied to clipboard
fun <T : Any> MultivariateIntegrand(vararg features: IntegrandFeature, function: (Point<T>) -> T): MultivariateIntegrand<T>
UnivariateIntegrand
Link copied to clipboard
fun <T : Any> UnivariateIntegrand(function: (Double) -> T, vararg features: IntegrandFeature): UnivariateIntegrand<T>

Properties

calls
Link copied to clipboard
val Integrand.calls: Int
gaussIntegrator
Link copied to clipboard
val <T : Any> Field<T>.gaussIntegrator: GaussIntegrator<T>
Create a Gauss integrator for this field.
simpsonIntegrator
Link copied to clipboard
val <T : Any> Field<T>.simpsonIntegrator: SimpsonIntegrator<T>
simpsonIntegrator
Link copied to clipboard
val DoubleField.simpsonIntegrator: DoubleSimpsonIntegrator
splineIntegrator
Link copied to clipboard
value
Link copied to clipboard
val <T : Any> MultivariateIntegrand<T>.value: T?
value
Link copied to clipboard
val <T : Any> UnivariateIntegrand<T>.value: T
Value of the integrand or error
valueOrNull
Link copied to clipboard
val <T : Any> UnivariateIntegrand<T>.valueOrNull: T?
Value of the integrand if it is present or null