Copyright | (c) 2013 Ertugrul Soeylemez |
---|---|
License | BSD3 |
Maintainer | Ertugrul Soeylemez <es@ertes.de> |
Safe Haskell | None |
Language | Haskell2010 |
- derivative :: (RealFloat a, HasTime t s, Monoid e) => Wire s e m a a
- integral :: (Fractional a, HasTime t s) => a -> Wire s e m a a
- integralWith :: (Fractional a, HasTime t s) => (w -> a -> a) -> a -> Wire s e m (a, w) a
Calculus
derivative :: (RealFloat a, HasTime t s, Monoid e) => Wire s e m a a Source
Time derivative of the input signal.
- Depends: now.
- Inhibits: at singularities.
:: (Fractional a, HasTime t s) | |
=> a | Integration constant (aka start value). |
-> Wire s e m a a |
Integrate the input signal over time.
- Depends: before now.
:: (Fractional a, HasTime t s) | |
=> (w -> a -> a) | Correction function. |
-> a | Integration constant (aka start value). |
-> Wire s e m (a, w) a |
Integrate the left input signal over time, but apply the given correction function to it. This can be used to implement collision detection/reaction.
The right signal of type w
is the world value. It is just passed
to the correction function for reference and is not used otherwise.
The correction function must be idempotent with respect to the world
value: f w (f w x) = f w x
. This is necessary and sufficient to
protect time continuity.
- Depends: before now.