Change structure
This commit is contained in:
parent
7cb597989c
commit
e1375756dd
3 changed files with 149 additions and 14 deletions
|
@ -1,22 +1,12 @@
|
|||
package main;
|
||||
|
||||
|
||||
import org.graphstream.graph.*;
|
||||
import org.graphstream.graph.implementations.*;
|
||||
|
||||
import structure.Grid;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Graph graph = new SingleGraph("Tutorial 1");
|
||||
|
||||
graph.addNode("A");
|
||||
graph.addNode("B");
|
||||
graph.addNode("C");
|
||||
graph.addEdge("AB", "A", "B");
|
||||
graph.addEdge("BC", "B", "C");
|
||||
graph.addEdge("CA", "C", "A");
|
||||
|
||||
graph.display();
|
||||
Grid g=new Grid();
|
||||
|
||||
g.printGrid();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue