A nice haskell interface for building graphs with handy graph algorithms from other modules
Haskell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Data/Graph
README

README

This is a stub for a classy haskell graph class library. The purpose of this
module is to take care of annoying details like mapping node types onto integer
vertices, which shouldn't need to be dealt with directly very often. Right now,
this module provides an instance for a directed graph data type that is built
around Data.Map for simplicity.

Examples:
    import Data.Graph.Class
    
    -- Construct a graph from edges:
    fromEdges [("cat","dog"),("dog","cat"),("pig","pig")] :: GraphD String
    
    -- or from disconnected nodes:
    fromNodes $ words "cow pig chicken prawn" :: GraphD String
    
    -- which may be connected later:
    withEdges [("crocoduck","duck"),("crocoduck","crocodile")]
        $ fromNodes $ words "crocodile duck cow" :: GraphD String

With the GraphD implementation, any nodes mentioned in edges will be implicitly
added to the pool of nodes and the integer vertex map will be updated
accordingly.

Todo:
    graph algorithms
    conversion routines between common graph datatypes
    weighted graphs
    adjacency matrices