wumpus-basic-0.10.0: Common drawing utilities built on wumpus-core.

PortabilityGHC
Stabilityunstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Chains.Base

Description

Generate points in an iterated chain.

WARNING - very unstable.

Synopsis

Documentation

data Chain ux uy u Source

type LocChain ux uy u = Point2 u -> Chain ux uy uSource

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

data AnaAlg st a 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.

Constructors

Done 
Step a !st 

data IterAlg st a Source

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.

Constructors

IterStep a !st 

data BivariateAlg ux uy Source

bivariate :: st -> (st -> AnaAlg st (ux, uy)) -> BivariateAlg ux uySource

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