Copyright | (c) David Janin, 2016 |
---|---|
License | see the LICENSE file in the distribution |
Maintainer | janin@labri.fr |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
Temporal values arise from well bracketed events.
- data Event v
- eventsToQList :: (Eq d, Eq v, Num d, Lattice d) => [(d, Event v)] -> QList d iv v
- eventsToTile :: (Eq d, Eq v, Num d, Lattice d) => [(d, Event v)] -> Tile d iv v
- qListToEvents :: (Eq d, Num d, Ord d, Lattice d, Eq v, POrd v) => QList d iv v -> [(d, Event v)]
- tileToEvents :: (Eq d, Num d, Ord d, Lattice d, Eq v, POrd v) => Tile d iv v -> [(d, Event v)]
- filterEvent :: Ord v => Weight v -> [Event v] -> (Weight v, [Event v])
- emptyWeight :: Weight v
Documentation
Events of type v. A temporal value v is then a pair of event On v, Off v, that tells how much last the value v. The duration of an temporal value v is defined as the time elpased between the reception of event On v and teh event Off v.
A sequence of events over the value type v is well parenthesized, that is, for every value v:
- every On v event (resp. Off v event) is necessarily followed (resp. preceeded) by an Off v event (resp. On v event),
- two On v events (resp. Off v events) are necessarily separated by an Off v event (resp. an On v event).
Simultaneous events On v and Off v events denote a temporal value of duration 0 that is our encoding of classical (unpaired) events
eventsToTile :: (Eq d, Eq v, Num d, Lattice d) => [(d, Event v)] -> Tile d iv v Source #
Converts the resulting qlists into tiles (obsolete)
qListToEvents :: (Eq d, Num d, Ord d, Lattice d, Eq v, POrd v) => QList d iv v -> [(d, Event v)] Source #
tileToEvents :: (Eq d, Num d, Ord d, Lattice d, Eq v, POrd v) => Tile d iv v -> [(d, Event v)] Source #
filterEvent :: Ord v => Weight v -> [Event v] -> (Weight v, [Event v]) Source #
Filters On and Off events to ensure they are well parenthesized
emptyWeight :: Weight v Source #
initial Weight value