@Test void GraphWith3Nodes_StartIs0_DistanceIs2_All() { graph = GraphBuilder.Build().WithNodes(3).AllConnected(2).getGraph(); PathDataObject pathData = DijkstraAlgorithm.findShortestPath(graph, "0", "1"); Assertions.assertEquals(3, pathData.distances.size()); Assertions.assertEquals(0, pathData.GetDistanceToNode(graph.getNode("0"))); Assertions.assertEquals(2, pathData.GetDistanceToNode(graph.getNode("1"))); Assertions.assertEquals(2, pathData.GetDistanceToNode(graph.getNode("2"))); }
public static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier) throws ArrayStoreException { return findShortestPath(graph, graph.getNode(sourceNodeIdentifier), graph.getNode(targetNodeIdentifier)); }
DijkstraAlgorithm { public static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier) throws ArrayStoreException { return findShortestPath(graph, graph.getNode(sourceNodeIdentifier), graph.getNode(targetNodeIdentifier)); } }
DijkstraAlgorithm { public static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier) throws ArrayStoreException { return findShortestPath(graph, graph.getNode(sourceNodeIdentifier), graph.getNode(targetNodeIdentifier)); }  }
DijkstraAlgorithm { public static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier) throws ArrayStoreException { return findShortestPath(graph, graph.getNode(sourceNodeIdentifier), graph.getNode(targetNodeIdentifier)); }  static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier); static PathDataObject findShortestPath(GraphObject graph, String sourceNodeIdentifier, String targetNodeIdentifier); static PathData findShortestPath(Graph graph, GraphNode sourceNode, GraphNode targetNode); static PathDataObject findShortestPath(GraphObject graph, NodeGraphObject sourceNode, NodeGraphObject targetNode); }
DijkstraAlgorithm { public static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier) throws ArrayStoreException { return findShortestPath(graph, graph.getNode(sourceNodeIdentifier), graph.getNode(targetNodeIdentifier)); }  static PathData findShortestPath(Graph graph, String sourceNodeIdentifier, String targetNodeIdentifier); static PathDataObject findShortestPath(GraphObject graph, String sourceNodeIdentifier, String targetNodeIdentifier); static PathData findShortestPath(Graph graph, GraphNode sourceNode, GraphNode targetNode); static PathDataObject findShortestPath(GraphObject graph, NodeGraphObject sourceNode, NodeGraphObject targetNode);  }