1 | export class GraphEdge {
|
2 | constructor(startVertex, endVertex, weight = 0) {
|
3 | this.startVertex = startVertex;
|
4 | this.endVertex = endVertex;
|
5 | this.weight = weight;
|
6 | }
|
7 | get Weight() {
|
8 | return this.weight;
|
9 | }
|
10 | get EndVertex() {
|
11 | return this.endVertex;
|
12 | }
|
13 | get StartVertex() {
|
14 | return this.startVertex;
|
15 | }
|
16 | }
|