Commit before adjusting wall zoning

This commit is contained in:
2022-07-01 09:17:22 +01:00
parent 4e893931a8
commit 870225b6b6
8 changed files with 40 additions and 39 deletions
+3 -2
View File
@@ -117,11 +117,12 @@ toPathEdge :: Point2 -> Point2 -> PathEdge
toPathEdge sp' ep = PathEdge sp' ep mempty
insertEdges :: (Point2 -> Point2 -> b)
-> Set (Point2,Point2) -> Gr Point2 b -> Map Point2 Int -> (Gr Point2 b,Map (V2 Point2) Int2)
-> Set (Point2,Point2) -> Gr Point2 b -> Map Point2 Int
-> (Gr Point2 b, Map (V2 Point2) (Int,Int,b))
insertEdges efunc pairset gr nm = runIdentity $ S.fold_ insertedge (gr,mempty) id $ S.each pairset
where
insertedge (gr',em) (a,b) = (insEdge (f a,f b,efunc a b) gr'
, M.insert (V2 a b) (V2 (f a) (f b)) em)
, M.insert (V2 a b) (f a,f b,efunc a b) em)
f a = nm M.! a
insertNodes :: Set (Point2,Point2) -> (Gr Point2 b, Map Point2 Int, Int)