org.javanetworkanalyzer.alg
Class DijkstraForAccessibility<E extends EdgeSPT>

java.lang.Object
  extended by org.javanetworkanalyzer.alg.GraphSearchAlgorithm<V,E>
      extended by org.javanetworkanalyzer.alg.Dijkstra<VAccess,E>
          extended by org.javanetworkanalyzer.alg.DijkstraForAccessibility<E>
All Implemented Interfaces:
TraversalAlg<VAccess,E>

public class DijkstraForAccessibility<E extends EdgeSPT>
extends Dijkstra<VAccess,E>

An implementation of Dijkstra's algorithm which can be used to calculate, for each vertex, the (distance to the) closest destination among several possible destinations in an AccessibilityAnalyzer.

Author:
Adam Gouge

Field Summary
 
Fields inherited from class org.javanetworkanalyzer.alg.Dijkstra
TOLERANCE
 
Fields inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm
currentStartNode, graph
 
Constructor Summary
DijkstraForAccessibility(org.jgrapht.Graph<VAccess,E> graph)
          Constructor: sets the graph.
 
Method Summary
protected  void shortestPathSoFarUpdate(VAccess startNode, VAccess u, VAccess v, Double uvWeight, E e, PriorityQueue<VAccess> queue)
          Updates the distance to the neighbor and updates the distance to the closest destination if necessary.
 
Methods inherited from class org.javanetworkanalyzer.alg.Dijkstra
calculate, calculate, init, manyToMany, manyToOne, multipleShortestPathUpdate, oneToMany, oneToOne, preRelaxStep, reconstructTraversalGraph, relax
 
Methods inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm
outdegree, outgoingEdgesOf, outgoingEdgesOf, reconstructTraversalGraph, successorListOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DijkstraForAccessibility

public DijkstraForAccessibility(org.jgrapht.Graph<VAccess,E> graph)
Constructor: sets the graph.

Parameters:
graph - Graph
Method Detail

shortestPathSoFarUpdate

protected void shortestPathSoFarUpdate(VAccess startNode,
                                       VAccess u,
                                       VAccess v,
                                       Double uvWeight,
                                       E e,
                                       PriorityQueue<VAccess> queue)
Updates the distance to the neighbor and updates the distance to the closest destination if necessary.

Overrides:
shortestPathSoFarUpdate in class Dijkstra<VAccess,E extends EdgeSPT>
Parameters:
u - Vertex u
v - Vertex v
uvWeight - w(u,v)
e - Edge e
queue - Queue


Copyright © 2014. All Rights Reserved.