//compare distance to target using the heuristic provided public int CompareTo(object obj) { if (this == obj) { return(0); } var result1 = heuristic.HueristicDistanceToTarget(Vertex, destinationVertex); var result2 = heuristic.HueristicDistanceToTarget((obj as AStarWrap <T, W>).Vertex, destinationVertex); return(result1.CompareTo(result2)); }
//compare distance to target using the heuristic provided public int CompareTo(AStarWrap <T, W> other) { if (this == other) { return(0); } var result1 = heuristic.HueristicDistanceToTarget(Vertex, destinationVertex); var result2 = heuristic.HueristicDistanceToTarget(other.Vertex, destinationVertex); return(result1.CompareTo(result2)); }