Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Time = Double
- newtype Timed a = Timed [(Time, a)]
- type Rate = Double
- type Probability = Double
- asTimed :: Num a => [(Time, a)] -> Maybe (Timed a)
- isAscending :: Ord a => [a] -> Bool
- cadlagValue :: Timed a -> Time -> Maybe a
- cadlagValue' :: [(Time, a)] -> Time -> Maybe a
- diracDeltaValue :: Timed a -> Time -> Maybe a
- diracDeltaValue' :: [(Time, a)] -> Time -> Maybe a
- hasTime :: Timed a -> Time -> Bool
- hasTime' :: [(Time, a)] -> Time -> Bool
- nextTime :: Timed a -> Time -> Maybe Time
- nextTime' :: [(Time, a)] -> Time -> Maybe Time
Documentation
Type containing values at times. The times are increasing as required by
asTimed
.
Instances
Eq a => Eq (Timed a) Source # | |
Show a => Show (Timed a) Source # | |
Generic (Timed a) Source # | |
Semigroup (Timed a) Source # | |
ToJSON a => ToJSON (Timed a) Source # | |
Defined in Epidemic.Types.Parameter | |
FromJSON a => FromJSON (Timed a) Source # | |
type Rep (Timed a) Source # | |
Defined in Epidemic.Types.Parameter |
type Probability = Double Source #
Construct a timed list if possible.
isAscending :: Ord a => [a] -> Bool Source #
Predicate to check if a list of orderable objects is in ascending order.
cadlagValue :: Timed a -> Time -> Maybe a Source #
Evaluate the timed object treating it as a cadlag function
diracDeltaValue :: Timed a -> Time -> Maybe a Source #
Evaluate the timed object treating it as a direct delta function
hasTime :: Timed a -> Time -> Bool Source #
Check if there exists a pair with a particular time index.