
com.barrybecker4.discreteoptimization.common.graph.visualization.demos.GraphStreamExample.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bb4-shortest-paths Show documentation
Show all versions of bb4-shortest-paths Show documentation
bb4-shortest-paths java code.
The newest version!
package com.barrybecker4.discreteoptimization.common.graph.visualization.demos
import org.graphstream.graph.*
import org.graphstream.graph.implementations.*
object GraphStreamExample {
def main(args: Array[String]): Unit = {
System.setProperty("org.graphstream.ui", "swing")
val 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
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy