Add various capabilities for generating graphs, fixes to lasgun
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
module GraphHelp where
|
||||
import Data.Graph.Inductive
|
||||
|
||||
mkGraphFromEdges :: Ord a => [(a,a,b)] -> Gr a b
|
||||
mkGraphFromEdges es = insMapEdges nm es gr
|
||||
where
|
||||
(gr,nm,_) = insMapNodes new ns empty
|
||||
ns = concatMap (\(x,y,_) -> [x,y]) es
|
||||
Reference in New Issue
Block a user