Copyright | (c) 2013 Ertugrul Soeylemez |
---|---|

License | BSD3 |

Maintainer | Ertugrul Soeylemez <es@ertes.de> |

Safe Haskell | None |

Language | Haskell2010 |

- data Timeline t a
- insert :: Ord t => t -> a -> Timeline t a -> Timeline t a
- singleton :: t -> a -> Timeline t a
- union :: Ord t => Timeline t a -> Timeline t a -> Timeline t a
- linAvg :: (Fractional a, Fractional t, Real t) => t -> t -> Timeline t a -> a
- linCutL :: (Fractional a, Fractional t, Real t) => t -> Timeline t a -> Timeline t a
- linCutR :: (Fractional a, Fractional t, Real t) => t -> Timeline t a -> Timeline t a
- linLookup :: (Fractional a, Fractional t, Real t) => t -> Timeline t a -> a
- scAvg :: (Fractional a, Real t) => t -> t -> Timeline t a -> a
- scCutL :: Ord t => t -> Timeline t a -> Timeline t a
- scCutR :: Ord t => t -> Timeline t a -> Timeline t a
- scLookup :: Ord t => t -> Timeline t a -> a

# Time lines for statistics wires

A time line is a non-empty set of samples together with time information.

# Constructing time lines

union :: Ord t => Timeline t a -> Timeline t a -> Timeline t a Source

Union of two time lines. Right-biased.

# Linear sampling

linAvg :: (Fractional a, Fractional t, Real t) => t -> t -> Timeline t a -> a Source

Linearly interpolate the points in the time line, integrate the given time interval of the graph, divide by the interval length.

linCutL :: (Fractional a, Fractional t, Real t) => t -> Timeline t a -> Timeline t a Source

Cut the timeline at the given point in time `t`

, such that all
samples up to but not including `t`

are forgotten. The most recent
sample before `t`

is moved and interpolated accordingly.

linCutR :: (Fractional a, Fractional t, Real t) => t -> Timeline t a -> Timeline t a Source

Cut the timeline at the given point in time `t`

, such that all
samples later than `t`

are forgotten. The most recent sample after
`t`

is moved and interpolated accordingly.

linLookup :: (Fractional a, Fractional t, Real t) => t -> Timeline t a -> a Source

Look up with linear sampling.

# Staircase sampling

scAvg :: (Fractional a, Real t) => t -> t -> Timeline t a -> a Source

Integrate the given time interval of the staircase, divide by the interval length.

scCutL :: Ord t => t -> Timeline t a -> Timeline t a Source

Cut the timeline at the given point in time `t`

, such that all
samples up to but not including `t`

are forgotten. The most recent
sample before `t`

is moved accordingly.