Portability | GHC |
---|---|
Stability | unstable |
Maintainer | stephen.tetley@gmail.com |
Generate points in an iterated chain.
WARNING - very unstable.
- data Chain ux uy u
- type LocChain ux uy u = Point2 u -> Chain ux uy u
- chain :: BivariateAlg ux uy -> Chain ux uy u
- chainFrom :: Num u => BivariateAlg ux uy -> LocChain ux uy u
- unchain :: ScalingContext ux uy u -> Chain ux uy u -> [Point2 u]
- data AnaAlg st a
- data IterAlg st a = IterStep a !st
- data BivariateAlg ux uy
- bivariate :: st -> (st -> AnaAlg st (ux, uy)) -> BivariateAlg ux uy
- data SequenceAlg a
- iteration :: (a -> a) -> a -> SequenceAlg a
- bounded :: Int -> SequenceAlg (ux, uy) -> BivariateAlg ux uy
- pairOnXs :: (ux -> uy) -> SequenceAlg ux -> SequenceAlg (ux, uy)
- pairOnYs :: (r -> l) -> SequenceAlg r -> SequenceAlg (l, r)
Documentation
chain :: BivariateAlg ux uy -> Chain ux uy uSource
chainFrom :: Num u => BivariateAlg ux uy -> LocChain ux uy uSource
unchain :: ScalingContext ux uy u -> Chain ux uy u -> [Point2 u]Source
Chains are built as unfolds - AnaAlg avoids the pair constructor in the usual definition of unfoldr and makes the state strict.
It is expected that all Chains built on unfolds will terminate.
IterAlg is a variant of AnaAlg that builds infinite sequences (iterations).
When lifted to a Chain an iteration is bounded by a count so it will terminate.
IterStep a !st |
data BivariateAlg ux uy Source
bivariate :: st -> (st -> AnaAlg st (ux, uy)) -> BivariateAlg ux uySource
data SequenceAlg a Source
iteration :: (a -> a) -> a -> SequenceAlg aSource
bounded :: Int -> SequenceAlg (ux, uy) -> BivariateAlg ux uySource
pairOnXs :: (ux -> uy) -> SequenceAlg ux -> SequenceAlg (ux, uy)Source
pairOnYs :: (r -> l) -> SequenceAlg r -> SequenceAlg (l, r)Source