routage-optimiste/main/Main.java
2016-03-14 20:30:30 +01:00

26 lines
610 B
Java

package main;
import org.graphstream.graph.Graph;
import org.graphstream.graph.implementations.SingleGraph;
import structure.Grid;
public class Main {
public static void main(String[] args) {
Grid g=new Grid();
g.printLinkWeight();
System.out.println("Best link : " + g.getBestLinkIndex());
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.getEdge(0).addAttribute("ui.style", "fill-color: red;");
graph.display(false);
}
}