From c444380c9ac747385f9ebc2dbc21aeda94d38435 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Mon, 14 Mar 2016 20:30:30 +0100 Subject: [PATCH] Change main --- main/Main.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main/Main.java b/main/Main.java index cad6995..b1e7a0a 100644 --- a/main/Main.java +++ b/main/Main.java @@ -1,5 +1,8 @@ package main; +import org.graphstream.graph.Graph; +import org.graphstream.graph.implementations.SingleGraph; + import structure.Grid; public class Main { @@ -8,5 +11,16 @@ public class Main { 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); } }