Add dijkstra.

This commit is contained in:
Oleksii Trekhleb
2018-05-02 08:15:20 +03:00
parent 119cddc8fc
commit 59f61dc132
5 changed files with 136 additions and 2 deletions

View File

@ -71,6 +71,7 @@ export default class Graph {
/**
* @param {GraphVertex} startVertex
* @param {GraphVertex} endVertex
* @return {(GraphEdge|null)}
*/
findEdge(startVertex, endVertex) {
const vertex = this.getVertexByKey(startVertex.getKey());