Skip to content

gmoothart/GraphBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphBuilder

A simple c# graph library with a fluent interface for graph construction and a
minumum of syntactic noise.

It is not industrial strength, the main emphasis is on prototyping and testing
graph algorithms. Graphs can be built quickly and individual nodes can contain
an arbitrary data type. Even anonymous types are alowed through the builder
interface (see below for an example).

Examples

Simple Cyclic Graph


          [x]
          / \
       [y]   [w]
          \ /
          [a]
         /   \
       [b]    [d]
        |      | \
       [c]    [e] [f]
              

    var g1 = Graph.Node("a",
               Graph.Node("b",
                 Graph.Node("c")),
               Graph.Node("d", 
                 Graph.Node("e"),
                 Graph.Node("f")));

    var g2 = Graph.Node("x",
               Graph.Node("y",
                 g1),
               Graph.Node("w",
                 g1));

Graph with Anonymous types


  var g = Graph.Node(new { Name="n1", Cost=2.5m },
            Graph.Node(new { Name="n2", Cost=2.5m }),
            Graph.Node(new { Name="n3", Cost=5.31m }));
            

TODO

Algorithms/Data Structures I would like to implement:

  • Fibonacci heap (for better bound on Dijkstra’s Shortest-Path)
  • Boruvka’s minimum spanning tree (paralellized?)
    http://www.ics.uci.edu/~eppstein/161/960206.html
  • Bellman-Ford shortest-path
  • Suffix tree
  • Red/Black or other ballanced binary tree

About

Simple, fluent graph library that gets out of your way

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages