Add image
This commit is contained in:
parent
279586d5e7
commit
c129af5142
10 changed files with 445 additions and 11 deletions
|
@ -1,6 +1,5 @@
|
|||
package main;
|
||||
|
||||
import java.awt.RenderingHints.Key;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
@ -16,13 +15,13 @@ public class Main {
|
|||
|
||||
public static void main(String[] args) {
|
||||
Grid g=new Grid();
|
||||
//g.printLinkWeight();
|
||||
// System.out.println("Best link : " + g.getBestLinkIndex());
|
||||
|
||||
|
||||
System.setProperty("gs.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer");
|
||||
Graph graph = new SingleGraph("Tutorial 1");
|
||||
|
||||
ArrayList<Router> grid=g.getGrid();
|
||||
ArrayList<ArrayList<Integer>> links=g.getLinks();
|
||||
graph.addAttribute("ui.stylesheet", "url('resources/style.css')");
|
||||
|
||||
ArrayList<Router> grid=g.getGrid();
|
||||
for(Router r : grid){
|
||||
graph.addNode(r.name);
|
||||
|
||||
|
@ -30,7 +29,7 @@ public class Main {
|
|||
for(Router r : grid){
|
||||
String current=r.name;
|
||||
HashMap<Router, Integer> relier=r.getLinks();
|
||||
Set k=relier.keySet();
|
||||
Set<Router> k=relier.keySet();
|
||||
Iterator<Router> i=k.iterator();
|
||||
while(i.hasNext()){
|
||||
Router currentRouter=i.next();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue