Class BidirectionalDijkstra

java.lang.Object
org.graph4j.GraphAlgorithm
org.graph4j.shortestpath.BidirectionalDijkstra
All Implemented Interfaces:
SinglePairShortestPath

public class BidirectionalDijkstra extends GraphAlgorithm implements SinglePairShortestPath
Determines the shortest path between two vertices. Performs a forward search starting from a source vertex and a reverse (backward) search on the transpose graph starting from the target vertex.
Author:
Cristian Frăsinaru
  • Constructor Details

    • BidirectionalDijkstra

      public BidirectionalDijkstra(Graph graph, int source, int target)
      Creates an algorithm to find the shortest path between source and target.
      Parameters:
      graph - the input graph.
      source - the source vertex number.
      target - the target vertex number.
  • Method Details