use of com.google.common.graph.MutableGraph in project narchy by automenta.
the class SimpleGraphTest method main.
public static void main(String[] args) {
MutableGraph g = GraphBuilder.directed().build();
g.putEdge(("a"), ("b"));
g.putEdge(("b"), ("c"));
g.putEdge(("b"), ("d"));
MapNodeGraph h = new MapNodeGraph();
h.addNode(("x"));
h.addNode(("y"));
h.addNode(("z"));
h.addNode(("w"));
h.addEdge(("x"), ("xy"), ("y"));
h.addEdge(("x"), ("xz"), ("z"));
h.addEdge(("y"), ("yz"), ("z"));
h.addEdge(("w"), ("wy"), ("y"));
SimpleGraph sg = new SimpleGraph();
// sg.commit(g);
sg.commit(h);
sg.show(800, 600, false);
}
Aggregations