Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- merge :: PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r
- mergeWith :: (f -> f -> f) -> PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r
- mergeAllWith :: Foldable1 t => (f -> f -> f) -> t (PlanarSubdivision s v e f r) -> PlanarSubdivision s v e f r
- embedAsHoleIn :: forall s h v e f r. PlanarSubdivision h v e f r -> (f -> f -> f) -> FaceId' s -> PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r
- embedAsHolesIn :: forall t s h v e f r. (Foldable1 t, Functor t) => t (PlanarSubdivision h v e f r) -> (t f -> f -> f) -> FaceId' s -> PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r
Documentation
merge :: PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r -> PlanarSubdivision s v e f r Source #
Merge a pair of *disjoint* planar subdivisions, unifying their outer face. For the outerface data it simply takes the data of the first subdivision.
runningtime: \(O(n)\)
:: (f -> f -> f) | how to merge the data of the outer face |
-> PlanarSubdivision s v e f r | |
-> PlanarSubdivision s v e f r | |
-> PlanarSubdivision s v e f r |
Merge a pair of *disjoint* planar subdivisions. In particular, this function unifies the structure assuming that the two subdivisions share the outer face.
runningtime: \(O(n)\)
mergeAllWith :: Foldable1 t => (f -> f -> f) -> t (PlanarSubdivision s v e f r) -> PlanarSubdivision s v e f r Source #
Merge a pair of *disjoint* planar subdivisions, unifying their outer face. The given function is used to merge the data corresponding to the outer face. The subdivisions are merged pairwise, no guarantees are given about the order in which they are merged. Hence, it is expected that f is commutative.
running time: \(O(n\log n)\), where \(n\) is the total size of the subdivisions.
:: forall s h v e f r. PlanarSubdivision h v e f r | The hole |
-> (f -> f -> f) | How to merge the face data (hole value first) |
-> FaceId' s | Face in which to embed the given subdivisions |
-> PlanarSubdivision s v e f r | the outer subdivision |
-> PlanarSubdivision s v e f r |
:: forall t s h v e f r. (Foldable1 t, Functor t) | |
=> t (PlanarSubdivision h v e f r) | The disjoint "holes" |
-> (t f -> f -> f) | How to merge the face data |
-> FaceId' s | Face in which to embed the given subdivisions |
-> PlanarSubdivision s v e f r | the outer subdivision |
-> PlanarSubdivision s v e f r |