combinat-diagrams-0.2: Graphical representations for various combinatorial objects

Safe HaskellNone
LanguageHaskell2010

Math.Combinat.Diagrams.LatticePaths

Description

Lattice path diagrams

For example, the code:

 let u = UpStep
     d = DownStep
     path = [ u,u,d,u,u,u,d,u,d,d,u,d,u,u,u,d,d,d,d,d,u,d,u,u,d,d ]     
 drawLatticePath $ path

produces the diagram:

Synopsis

Documentation

data LatticeConvention Source

Which orientation to draw the lattice paths

Constructors

Hilly

the steps are (1,1) and (1,-1)

UpRight

the steps are (0,1) and (0,1)

drawLatticePath :: Renderable (Path V2 Double) b => LatticePath -> QDiagram b V2 Double Any Source

Draws a lattice path with the default settings

drawLatticePath' Source

Arguments

:: Renderable (Path V2 Double) b 
=> LatticeConvention

orientation

-> Colour Double

color

-> Bool

whether to draw a grid

-> LatticePath

whether to draw a grid

-> QDiagram b V2 Double Any 

drawRectangularGrid :: Renderable (Path V2 Double) b => (Int, Int) -> QDiagram b V2 Double Any Source

Draws a rectangular grid of the given size