Copyright | Copyright (c) 2009-2013, David Sorokin <david.sorokin@gmail.com> |
---|---|

License | BSD3 |

Maintainer | David Sorokin <david.sorokin@gmail.com> |

Stability | experimental |

Safe Haskell | Safe-Inferred |

Language | Haskell98 |

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.

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

# 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.