aivika-1.2.1: A multi-paradigm simulation library

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

Simulation.Aivika.Dynamics.Fold

Description

Tested with: GHC 7.6.3

This module defines the fold functions that allows traversing the values of any Dynamics computation in the integration time points.

Synopsis

Documentation

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

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

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

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