Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Layers x y
- fromList :: (Ord x, Semigroup y) => [(Interval x, y)] -> Layers x y
- toList :: Ord x => Layers x y -> [(Interval x, y)]
- empty :: Layers x y
- singleton :: Ord x => Interval x -> y -> Layers x y
- insert :: (Ord x, Semigroup y) => Interval x -> y -> Layers x y -> Layers x y
- squash :: Ord x => Layers x y -> Borel x
- thickness :: (Ord x, Monoid y) => x -> Layers x y -> y
- thickest :: (Ord x, Ord y) => Layers x y -> Maybe (Interval x, y)
- remove :: (Ord x, Group y) => y -> Interval x -> Layers x y -> Layers x y
- baseline :: (Ord x, Semigroup y) => y -> Layers x y -> Layers x y
- nestings :: (Ord x, Semigroup y) => [(Interval x, y)] -> [(Interval x, y)]
- nestingsAsc :: (Ord x, Semigroup y) => [(Interval x, y)] -> [(Interval x, y)]
Documentation
Instances
Functor (Layers x) Source # | |
(Ord x, Eq y) => Eq (Layers x y) Source # | |
(Ord x, Ord y) => Ord (Layers x y) Source # | |
(Ord x, Show x, Show y) => Show (Layers x y) Source # | |
Generic (Layers x y) Source # | |
(Ord x, Semigroup y) => Semigroup (Layers x y) Source # | |
(Ord x, Semigroup y) => Monoid (Layers x y) Source # | |
(Ord x, Group y) => Group (Layers x y) Source # | |
type Rep (Layers x y) Source # | |
Defined in Data.Interval.Layers |
fromList :: (Ord x, Semigroup y) => [(Interval x, y)] -> Layers x y Source #
Draw the Layers
of specified bases and thicknesses.
toList :: Ord x => Layers x y -> [(Interval x, y)] Source #
Get all of the bases and thicknesses in the Layers
.
singleton :: Ord x => Interval x -> y -> Layers x y Source #
singleton ix y
is the rectangle with base ix
of thickness y
.
insert :: (Ord x, Semigroup y) => Interval x -> y -> Layers x y -> Layers x y Source #
insert ix y l
draws over l
a rectangle with base ix
of thickness y
.
thickness :: (Ord x, Monoid y) => x -> Layers x y -> y Source #
Get the thickness of the Layers
at a point.
thickest :: (Ord x, Ord y) => Layers x y -> Maybe (Interval x, y) Source #
Where and how thick is the thickest Interval
?
remove :: (Ord x, Group y) => y -> Interval x -> Layers x y -> Layers x y Source #
Take away a thickness over a given base from the Layers
.
baseline :: (Ord x, Semigroup y) => y -> Layers x y -> Layers x y Source #
Add the given thickness to every point.