Safe Haskell | None |
---|---|
Language | Haskell98 |
Netrium is Copyright Anthony Waite, Dave Hetwett, Shaun Laurens 2009-2015, and files herein are licensed |under the MIT license, the text of which can be found in license.txt
- type Observations a = Map VarName (TimeSeries a)
- type Choices a = Map ChoiceId (TimedEvents a)
- data TimeSeries a
- = SeriesEntry Time a (TimeSeries a)
- | SeriesEnds Time
- | SeriesUnbounded
- lookupTimeSeries :: TimeSeries a -> Time -> Maybe a
- pruneTimeSeries :: Time -> TimeSeries a -> TimeSeries a
- lookupChoice :: Map ChoiceId (TimedEvents a) -> ChoiceId -> Time -> Maybe a
- timeSeriesEvents :: TimeSeries a -> TimedEvents (Maybe a)
- newtype TimedEvents a = TEs [(Time, a)]
- unTEs :: TimedEvents t -> [(Time, t)]
- mapAccumTS :: (acc -> x -> (acc, y)) -> acc -> TimedEvents x -> (acc, TimedEvents y)
- lookupTimedEvent :: TimedEvents a -> Time -> Maybe a
- insertEventBefore :: Time -> a -> TimedEvents a -> TimedEvents a
- insertEventAfter :: Time -> a -> TimedEvents a -> TimedEvents a
- pruneTimedEvents :: Time -> TimedEvents a -> TimedEvents a
- mergeEvents :: TimedEvents a -> TimedEvents b -> TimedEvents (MergeResult a b)
- mergeEventsBiased :: TimedEvents a -> TimedEvents a -> TimedEvents a
- mergeBy :: (a -> b -> Ordering) -> [a] -> [b] -> [MergeResult a b]
- data MergeResult a b
- = OnlyInLeft a
- | InBoth a b
- | OnlyInRight b
- data ObservationSeries
- data ChoiceSeries = ChoiceSeries (XMLTimedEvents Choice)
- data Choice
- data Timed a = Timed Time a
- data SeriesEnd
- type XMLTimeSeries a = ([Timed a], SeriesEnd)
- type XMLTimedEvents a = [Timed a]
- toTimedEvents :: XMLTimedEvents a -> TimedEvents a
- fromTimedEvents :: TimedEvents a -> XMLTimedEvents a
- toTimeSeries :: XMLTimeSeries a -> TimeSeries a
- fromTimeSeries :: TimeSeries a -> XMLTimeSeries a
Documentation
type Observations a = Map VarName (TimeSeries a) Source #
Time series
data TimeSeries a Source #
Read a => Read (TimeSeries a) Source # | |
Show a => Show (TimeSeries a) Source # | |
lookupTimeSeries :: TimeSeries a -> Time -> Maybe a Source #
pruneTimeSeries :: Time -> TimeSeries a -> TimeSeries a Source #
lookupChoice :: Map ChoiceId (TimedEvents a) -> ChoiceId -> Time -> Maybe a Source #
timeSeriesEvents :: TimeSeries a -> TimedEvents (Maybe a) Source #
Timed events
newtype TimedEvents a Source #
Functor TimedEvents Source # | |
Eq a => Eq (TimedEvents a) Source # | |
Read a => Read (TimedEvents a) Source # | |
Show a => Show (TimedEvents a) Source # | |
Monoid a => Monoid (TimedEvents a) Source # | |
unTEs :: TimedEvents t -> [(Time, t)] Source #
mapAccumTS :: (acc -> x -> (acc, y)) -> acc -> TimedEvents x -> (acc, TimedEvents y) Source #
lookupTimedEvent :: TimedEvents a -> Time -> Maybe a Source #
insertEventBefore :: Time -> a -> TimedEvents a -> TimedEvents a Source #
Insert an event into a TimedEvents series.
This event is placed before the other simultaneous events in the sequence.
insertEventAfter :: Time -> a -> TimedEvents a -> TimedEvents a Source #
Insert an event into a TimedEvents series.
This event is placed after the other simultaneous events in the sequence.
pruneTimedEvents :: Time -> TimedEvents a -> TimedEvents a Source #
mergeEvents :: TimedEvents a -> TimedEvents b -> TimedEvents (MergeResult a b) Source #
mergeEventsBiased :: TimedEvents a -> TimedEvents a -> TimedEvents a Source #
Merging
mergeBy :: (a -> b -> Ordering) -> [a] -> [b] -> [MergeResult a b] Source #
Generic merging utility. For sorted input lists this is a full outer join.
data MergeResult a b Source #
OnlyInLeft a | |
InBoth a b | |
OnlyInRight b |
XML instances
data ObservationSeries Source #
ObservationsSeriesBool String (XMLTimeSeries Bool) | |
ObservationsSeriesDouble String (XMLTimeSeries Double) |
XmlContent ObservationSeries Source # | |
HTypeable ObservationSeries Source # | |
data ChoiceSeries Source #
XmlContent ChoiceSeries Source # | |
HTypeable ChoiceSeries Source # | |
type XMLTimeSeries a = ([Timed a], SeriesEnd) Source #
type XMLTimedEvents a = [Timed a] Source #
toTimedEvents :: XMLTimedEvents a -> TimedEvents a Source #
fromTimedEvents :: TimedEvents a -> XMLTimedEvents a Source #
toTimeSeries :: XMLTimeSeries a -> TimeSeries a Source #
fromTimeSeries :: TimeSeries a -> XMLTimeSeries a Source #