Commit before adjusting wall zoning
This commit is contained in:
+3
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user