UNPKG

453 BPlain TextView Raw
1import { GraphVertex } from "./GraphVertex";
2
3export class GraphEdge<T>{
4
5 public get Weight() {
6 return this.weight;
7 }
8 public get EndVertex(): GraphVertex<T> {
9 return this.endVertex;
10 }
11 public get StartVertex(): GraphVertex<T> {
12 return this.startVertex;
13 }
14
15 public constructor(
16 private startVertex: GraphVertex<T>,
17 private endVertex: GraphVertex<T>,
18 private weight = 0){
19
20 }
21}