ts-ds-tool
Version:
Data structure and algorithm of TypeScript
17 lines (16 loc) • 368 B
JavaScript
export class GraphEdge {
constructor(startVertex, endVertex, weight = 0) {
this.startVertex = startVertex;
this.endVertex = endVertex;
this.weight = weight;
}
get Weight() {
return this.weight;
}
get EndVertex() {
return this.endVertex;
}
get StartVertex() {
return this.startVertex;
}
}