namespace HeuristicLab.Problems.RoutePlanning.Graph { public class Edge : IEdge { private readonly Vertex source; public Vertex Source { get { return this.source; } } private readonly Vertex target; public Vertex Target { get { return this.target; } } private short category; public short Category { get { return category; } set { category = value; } } public Edge(Vertex source, Vertex target) : this(source, target, 0) { } public Edge(Vertex source, Vertex target, short category) { this.source = source; this.target = target; this.category = category; } public override string ToString() { return string.Format("{0}->{1}", this.Source, this.Target); } } }