Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Layers x y
- fromList :: (Ord x, Ord y, 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, Ord y, Semigroup y) => Interval x -> y -> Layers x y -> Layers x y
- pile :: (Ord x, Ord y, Semigroup y) => y -> Interval x -> 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)
- dig :: (Ord x, Ord y, Group y) => y -> Interval x -> Layers x y -> Layers x y
- remove :: (Ord x, Ord y, Semigroup y) => Interval x -> Layers x y -> Layers x y
- (\-) :: (Ord x, Ord y, Semigroup y) => Layers x y -> Interval x -> Layers x y
- baseline :: (Ord x, Ord y, Semigroup y) => y -> Layers x y -> Layers x y
- difference :: (Ord x, Ord y, Group y) => Layers x y -> Layers x y -> Layers x y
- truncate :: (Ord x, Ord y, Semigroup y) => Interval x -> Layers x y -> Layers x y
- (\=) :: (Ord x, Ord y, Semigroup y) => Layers x y -> Interval x -> Layers x y
- toStepFunction :: (Ord x, Ord y, Monoid y) => Layers x y -> [(Levitated x, y)]
- integrate :: (Ord x, Ord y, Semigroup y, Num z) => (x -> x -> z) -> (y -> z) -> Interval x -> Layers x y -> Maybe z
- nestings :: (Ord x, Ord y, Semigroup y) => [(Interval x, y)] -> [(Interval x, y)]
Documentation
Instances
Functor (Layers x) Source # | |
(Data x, Data y, Ord x) => Data (Layers x y) Source # | |
Defined in Data.Interval.Layers gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Layers x y -> c (Layers x y) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Layers x y) # toConstr :: Layers x y -> Constr # dataTypeOf :: Layers x y -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Layers x y)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Layers x y)) # gmapT :: (forall b. Data b => b -> b) -> Layers x y -> Layers x y # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Layers x y -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Layers x y -> r # gmapQ :: (forall d. Data d => d -> u) -> Layers x y -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Layers x y -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Layers x y -> m (Layers x y) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Layers x y -> m (Layers x y) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Layers x y -> m (Layers x y) # | |
(Ord x, Ord y, Semigroup y) => Monoid (Layers x y) Source # | |
(Ord x, Ord y, Semigroup y) => Semigroup (Layers x y) Source # | |
Generic (Layers x y) Source # | |
(Ord x, Show x, Show y) => Show (Layers x y) Source # | |
(Ord x, Eq y) => Eq (Layers x y) Source # | |
(Ord x, Ord y) => Ord (Layers x y) Source # | |
(Ord x, Ord y, Group y) => Group (Layers x y) Source # | |
type Rep (Layers x y) Source # | |
Defined in Data.Interval.Layers |
fromList :: (Ord x, Ord y, 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, Ord y, 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
?
dig :: (Ord x, Ord y, Group y) => y -> Interval x -> Layers x y -> Layers x y Source #
Take away a thickness over a given base from the Layers
.
(\-) :: (Ord x, Ord y, Semigroup y) => Layers x y -> Interval x -> Layers x y Source #
Fliped infix version of remove
.
baseline :: (Ord x, Ord y, Semigroup y) => y -> Layers x y -> Layers x y Source #
Add the given thickness to every point.
difference :: (Ord x, Ord y, Group y) => Layers x y -> Layers x y -> Layers x y Source #
Excavate the second argument from the first.
(\=) :: (Ord x, Ord y, Semigroup y) => Layers x y -> Interval x -> Layers x y Source #
Flipped infix version of truncate
.
toStepFunction :: (Ord x, Ord y, Monoid y) => Layers x y -> [(Levitated x, y)] Source #
Convert the Layers
into a list of beginning-points and heights,
that define a step function piecewise.
integrate :: (Ord x, Ord y, Semigroup y, Num z) => (x -> x -> z) -> (y -> z) -> Interval x -> Layers x y -> Maybe z Source #