LINK
- the link type.public class LinkEdge<LINK extends Link> extends DefaultWeightedEdge
link
with nodes nodeA
and nodeB
to a graph is:
SimpleWeightedGraph<Node, LinkEdge> linkGraph = 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-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2019-01-06 01:35:05 +0100 (Sun, 06 Jan 2019) $, @version $Revision: 4831 $, by $Author: averbraeck $,
initial version Sep 12, 2014
Modifier and Type | Method and Description |
---|---|
LINK |
getLink() |
String |
toString() |
getSource, getTarget, getWeight
public LinkEdge(LINK link)
link
- LINK; the edge to take into the graph.public final LINK getLink()
public final String toString()
toString
in class DefaultWeightedEdge
Copyright © 2014–2019 Delft University of Technology. All rights reserved.