aivika-1.0: A multi-paradigm simulation library

CopyrightCopyright (c) 2009-2013, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell98

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.