Add graph.

This commit is contained in:
Oleksii Trekhleb
2018-04-10 11:42:32 +03:00
parent 840635e613
commit 67cdad8030
8 changed files with 426 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
export default class GraphEdge {
/**
* @param startVertex {GraphVertex}
* @param endVertex {GraphVertex}
* @param weight {number}
*/
constructor(startVertex, endVertex, weight = 1) {
this.startVertex = startVertex;
this.endVertex = endVertex;
this.weight = weight;
}
}