hgeometry-0.9.0.0: Geometric Algorithms, Data structures, and Data types.

Data.Geometry.PlanarSubdivision.Merge

Description

Description : Functions for merging two planar subdivisions

Synopsis

# 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)$$

Arguments

 :: (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.

Arguments

 :: 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

Arguments

 :: (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