diff options
Diffstat (limited to 'src/CS340.TSP/Road.cs')
-rw-r--r-- | src/CS340.TSP/Road.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CS340.TSP/Road.cs b/src/CS340.TSP/Road.cs index 9711c3c..cc939e9 100644 --- a/src/CS340.TSP/Road.cs +++ b/src/CS340.TSP/Road.cs @@ -3,7 +3,8 @@ using Interfaces; namespace TSP { - public class Road : IEdge<double> + using IEdge = IEdge<double>; + public class Road : IEdge, IComparable<IEdge> { public int U { get; set; } public int V { get; set; } @@ -18,7 +19,7 @@ namespace TSP Weight = weight; } - public int CompareTo(IEdge<double> edge) => + public int CompareTo(IEdge edge) => Weight.CompareTo(edge.Weight); public override string ToString() => $"{U} {V} {Weight}"; |