Safe Haskell | Safe-Infered |
---|
- delay :: x -> FRP e m x x
- integral :: (AbstractVector v, AbstractAdd p v) => p -> FRP e m (Rate v) p
- derivative :: (AbstractVector v, AbstractSubtract p v) => FRP e m p (Rate v)
- accumulateNumerical :: Frequency -> (i -> o -> Time -> Time -> Integer -> o) -> o -> FRP e m i o
- integralRK4 :: AbstractVector v => Frequency -> (p -> v -> p) -> p -> FRP e m (Time -> p -> Rate v) p
- integralRK4' :: AbstractVector v => Frequency -> (p -> v -> p) -> (p, Rate v) -> FRP e m (Time -> p -> Rate v -> Acceleration v) (p, Rate v)
- summation :: AbstractAdd p v => p -> FRP e m v p
- threadTime :: FRP e m () Time
- sticky :: (x -> Bool) -> x -> FRP e m x x
- initial :: FRP e m x x
- data EdgeDetectionMode
- = Fuzzy
- | Discrete
- | HashedDiscrete
- edge :: EdgeDetectionMode -> (x -> x -> Bool) -> FRP e m x Bool
- changed :: (x -> x -> Bool) -> FRP e m x Bool
- clingy :: EdgeDetectionMode -> (j -> j -> Bool) -> (j -> p) -> FRP e m j p
Documentation
integral :: (AbstractVector v, AbstractAdd p v) => p -> FRP e m (Rate v) pSource
Take the integral of a rate over time, using the trapezoidal rule.
derivative :: (AbstractVector v, AbstractSubtract p v) => FRP e m p (Rate v)Source
Take the derivative of a value over time, by simple subtraction between frames.
accumulateNumerical :: Frequency -> (i -> o -> Time -> Time -> Integer -> o) -> o -> FRP e m i oSource
accumulate
harness for some numerical methods.
Parameters are: current input, previous output, delta time, absolute time, and number of frames at the specified frequency.
integralRK4 :: AbstractVector v => Frequency -> (p -> v -> p) -> p -> FRP e m (Time -> p -> Rate v) pSource
integralRK4' :: AbstractVector v => Frequency -> (p -> v -> p) -> (p, Rate v) -> FRP e m (Time -> p -> Rate v -> Acceleration v) (p, Rate v)Source
summation :: AbstractAdd p v => p -> FRP e m v pSource
Sum some data frame-by-frame.
threadTime :: FRP e m () TimeSource
Elapsed time since the instantiation of this switch or thread. Reset when a thread switches.
sticky :: (x -> Bool) -> x -> FRP e m x xSource
Answer the most recent input that satisfies the predicate. Accepts an initial value, which need not itself satisfy the predicate.
This can be a performance optimization, if it prevents unecessary evaluation of an input.
data EdgeDetectionMode Source
The edge detection mode. If Discrete
, detect edge between subsequent frames only.
If Fuzzy
detect edge since the most recent previous detected edge.
If HashedDiscrete
, the comparison function is itself expensive, and the FRP runtime will compare by StableName
s as a short-circuit optimization.
edge :: EdgeDetectionMode -> (x -> x -> Bool) -> FRP e m x BoolSource
Returns True
only during frames on which the input has changed, based on a user-specified equality predicate.
The predicate function takes the most recent input as its first parameter.
clingy :: EdgeDetectionMode -> (j -> j -> Bool) -> (j -> p) -> FRP e m j pSource
Recalculate a function only at the edges of it's input.