I'm looking for an open source graph layout algorithm library that can function the following way: The user sends a list of nodes(nodes having different sizes) and a list of edges as parameters. The function then calculates the positions of the nodes and the edges according to the graph algorithms that the library supports(should support at least non-binary tree graph layout). Finally, it returns the positions of the nodes(coordinates) for the user to process and render in their own viewer. The algorithm should be able to also update already existing graphs(insertion/deletion).
I'm using WPF to render the data and create the graph, here is what I've tried so far:
I was expecting to find a library that could provide such functionality, but it seems to be a bit to specific. Should I start looking for tutorials on how to develop graph layout algorithms?
Graphviz does this if you use the -Tplain option
$ echo 'digraph { a->b }' | dot -Tplain
graph 1 0.75 1.5
node a 0.375 1.25 0.75 0.5 a solid ellipse black lightgrey
node b 0.375 0.25 0.75 0.5 b solid ellipse black lightgrey
edge a b 4 0.375 0.99579 0.375 0.88865 0.375 0.7599 0.375 0.64045 solid black
stop
There are four types of output statements.
graph scale width height
node name x y width height label style shape color fillcolor
edge tail head n x₁ y₁ .. xₙ yₙ [label xl yl] style color
stop
node The name value is the name of the node, and x and y give the node's position.