Search in sources :

Example 1 with SimpleGraph

use of spacegraph.space3d.widget.SimpleGraph 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);
}
Also used : SimpleGraph(spacegraph.space3d.widget.SimpleGraph) MapNodeGraph(jcog.data.graph.MapNodeGraph) MutableGraph(com.google.common.graph.MutableGraph)

Example 2 with SimpleGraph

use of spacegraph.space3d.widget.SimpleGraph in project narchy by automenta.

the class SimpleTreeTest method main.

public static void main(String[] args) {
    SimpleGraph sg = new SimpleGraph();
    sg.commit(FILE_TREE, new File("nal/src/test/"));
    sg.show(800, 600, false);
}
Also used : SimpleGraph(spacegraph.space3d.widget.SimpleGraph) File(java.io.File)

Aggregations

SimpleGraph (spacegraph.space3d.widget.SimpleGraph)2 MutableGraph (com.google.common.graph.MutableGraph)1 File (java.io.File)1 MapNodeGraph (jcog.data.graph.MapNodeGraph)1