public class DynamicOneToAllShortestPath extends NetworkSimplex
NetworkSimplex.ArcStatus, NetworkSimplex.PricingStrategy, NetworkSimplex.SolutionStatusPREFIX| Constructor and Description |
|---|
DynamicOneToAllShortestPath(String costName) |
| Modifier and Type | Method and Description |
|---|---|
org.graphstream.graph.Path |
getPath(org.graphstream.graph.Node target)
Returns the shortest path from the source node to a given target node.
|
<T extends org.graphstream.graph.Edge> |
getPathEdges(org.graphstream.graph.Node target)
An iterable view of the edges on the shortest path from the source node
to a given target node.
|
<T extends org.graphstream.graph.Edge> |
getPathEdgesIterator(org.graphstream.graph.Node target)
This iterator traverses the edges on the shortest path from the source
node to a given target node.
|
long |
getPathLength(org.graphstream.graph.Node node) |
<T extends org.graphstream.graph.Node> |
getPathNodes(org.graphstream.graph.Node target)
An iterable view of the nodes on the shortest path from the source node
to a given target node.
|
<T extends org.graphstream.graph.Node> |
getPathNodesIterator(org.graphstream.graph.Node target)
This iterator traverses the nodes on the shortest path from the source
node to a given target node.
|
String |
getSource() |
void |
init(org.graphstream.graph.Graph graph)
Initialization of the algorithm.
|
void |
nodeAdded(String sourceId,
long timeId,
String nodeId) |
void |
nodeRemoved(String sourceId,
long timeId,
String nodeId) |
void |
setSource(String sourceId) |
compute, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, getCapacityName, getCostName, getEdgeFromParent, getFlow, getFlow, getGraph, getInfeasibility, getNetworkBalance, getParent, getPricingStrategy, getSolutionCost, getSolutionInfeasibility, getSolutionStatus, getStatus, getStatus, getSupplyName, graphCleared, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, printBFS, setAnimationDelay, setLogFrequency, setLogStream, setPricingStrategy, setUIClasses, terminatepublic DynamicOneToAllShortestPath(String costName)
public String getSource()
public void setSource(String sourceId)
public void init(org.graphstream.graph.Graph graph)
AlgorithmAlgorithm.compute() method to initialize or reset the algorithm according
to the new given graph.init in interface Algorithminit in class NetworkSimplexgraph - The graph this algorithm is using.public void nodeAdded(String sourceId, long timeId, String nodeId)
nodeAdded in interface org.graphstream.stream.ElementSinknodeAdded in class NetworkSimplexpublic void nodeRemoved(String sourceId, long timeId, String nodeId)
nodeRemoved in interface org.graphstream.stream.ElementSinknodeRemoved in class NetworkSimplexpublic long getPathLength(org.graphstream.graph.Node node)
public <T extends org.graphstream.graph.Node> Iterator<T> getPathNodesIterator(org.graphstream.graph.Node target)
Iterator.remove().target - a nodegetPathNodes(Node)Iterator.next() of this
iterator takes O(1) timepublic <T extends org.graphstream.graph.Node> Iterable<T> getPathNodes(org.graphstream.graph.Node target)
getPathNodesIterator(Node).target - a nodegetPathNodesIterator(Node)public <T extends org.graphstream.graph.Edge> Iterator<T> getPathEdgesIterator(org.graphstream.graph.Node target)
Iterator.remove().target - a nodegetPathEdges(Node)Iterator.next() of this
iterator takes O(1) timepublic <T extends org.graphstream.graph.Edge> Iterable<T> getPathEdges(org.graphstream.graph.Node target)
getPathEdgesIterator(Node).target - a nodegetPathEdgesIterator(Node)public org.graphstream.graph.Path getPath(org.graphstream.graph.Node target)
Path object which
consumes heap memory proportional to the number of edges and nodes in the
path. When possible, prefer using getPathNodes(Node) and
getPathEdges(Node) which are more memory- and time-efficient.target - a nodeCopyright © 2015. All rights reserved.