ALGO: simplify
This commit is contained in:
parent
c8541f59b4
commit
41bc7e7744
@ -113,14 +113,13 @@ monotonePartitioning pts
|
|||||||
| otherwise = go (monotoneDiagonals pts) pts
|
| otherwise = go (monotoneDiagonals pts) pts
|
||||||
where
|
where
|
||||||
go :: [Segment] -> [PT] -> [[PT]]
|
go :: [Segment] -> [PT] -> [[PT]]
|
||||||
go [] _ = [[]]
|
go (x:xs) pts'@(_:_)
|
||||||
go _ [] = [[]]
|
|
||||||
go (x:xs) pts'
|
|
||||||
| isYmonotone a && isYmonotone b = [a, b]
|
| isYmonotone a && isYmonotone b = [a, b]
|
||||||
| isYmonotone b = b : go xs a
|
| isYmonotone b = b : go xs a
|
||||||
| otherwise = a : go xs b
|
| otherwise = a : go xs b
|
||||||
where
|
where
|
||||||
[a, b] = splitPoly pts' x
|
[a, b] = splitPoly pts' x
|
||||||
|
go _ _ = [[]]
|
||||||
|
|
||||||
|
|
||||||
-- |Try to eliminate the merge and split vertices by computing the
|
-- |Try to eliminate the merge and split vertices by computing the
|
||||||
|
Loading…
Reference in New Issue
Block a user