aivika-2.0: A multi-paradigm simulation library

Stabilityexperimental
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Safe HaskellSafe-Inferred

Simulation.Aivika.Dynamics.Extra

Contents

Description

Tested with: GHC 7.8.3

This module defines auxiliary functions such as interpolation ones that complement the memoization, for example. There are scan functions too.

Synopsis

Interpolation

initDynamics :: Dynamics a -> Dynamics aSource

Return the initial value.

discreteDynamics :: Dynamics a -> Dynamics aSource

Discretize the computation in the integration time points.

interpolateDynamics :: Dynamics a -> Dynamics aSource

Interpolate the computation based on the integration time points only. Unlike the discreteDynamics function it knows about the intermediate time points that are used in the Runge-Kutta method.

Scans

scanDynamics :: (a -> b -> a) -> a -> (Dynamics a -> Simulation (Dynamics a)) -> Dynamics b -> Simulation (Dynamics a)Source

Like the standard scanl function but applied to values in the integration time points. The accumulator values are transformed according to the third argument, which should be either function memo0Dynamics or its unboxed version.

scan1Dynamics :: (a -> a -> a) -> (Dynamics a -> Simulation (Dynamics a)) -> Dynamics a -> Simulation (Dynamics a)Source

Like the standard scanl1 function but applied to values in the integration time points. The accumulator values are transformed according to the second argument, which should be either function memo0Dynamics or its unboxed version.