avoid lines that share the same endpoints, but in reverse order

This commit is contained in:
Jack Wines 2024-02-04 04:04:46 -08:00
parent 48e087ca2e
commit 37bfefdc69
No known key found for this signature in database
GPG key ID: 25B20640600571E6

View file

@ -69,11 +69,8 @@ combinations xs =
. S.toList . S.fromList . S.toList . S.fromList
. filter (uncurry (/=)) . filter (uncurry (/=))
. sortOn (abs . uncurry distanceA) . sortOn (abs . uncurry distanceA)
-- . concat . withStrategy (parListChunk 2000 rdeepseq) $ . concatMap (\(x:xs) -> map (x,) xs)
$ [(x,y) | x <- xs, y <- xs] . init . tails $ xs
-- . map (\x -> take edgeLengthThreshold .
-- sortOn (abs . uncurry distanceA)
-- . map (\y -> (min x y, max x y)) $ xs) $ xs
where where
edgeLengthThreshold = 10 edgeLengthThreshold = 10