ALGO: simplify

This commit is contained in:
hasufell 2015-01-12 22:40:39 +01:00
parent c8541f59b4
commit 41bc7e7744
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -113,14 +113,13 @@ monotonePartitioning pts
| otherwise = go (monotoneDiagonals pts) pts
where
go :: [Segment] -> [PT] -> [[PT]]
go [] _ = [[]]
go _ [] = [[]]
go (x:xs) pts'
go (x:xs) pts'@(_:_)
| isYmonotone a && isYmonotone b = [a, b]
| isYmonotone b = b : go xs a
| otherwise = a : go xs b
where
[a, b] = splitPoly pts' x
go _ _ = [[]]
-- |Try to eliminate the merge and split vertices by computing the