L - the link type.public class LinkEdge<L extends Link<?,?>>
extends org.jgrapht.graph.DefaultWeightedEdge
link with nodes nodeA and nodeB to a graph is:
SimpleWeightedGraphlinkGraph = new SimpleWeightedGraph<>(LinkEdge.class); ... Link link = new Link(nodeA, nodeB, name); LinkEdge linkEdge = new LinkEdge(link); linkGraph.addEdge(nodeA, nodeB, linkEdge); linkGraph.setEdgeWeight(linkEdge, link.getLength().doubleValue());
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Copyright © 2014–2015 Delft University of Technology. All rights reserved.