YaccConstructor / QuickGraph

Generic Graph Data Structures and Algorithms for .NET
http://yaccconstructor.github.io/QuickGraph/
Microsoft Public License
523 stars 198 forks source link

HoffmanPavleyRankedShortestPathAlgorithm.ToString() #174

Open jnyrup opened 6 years ago

jnyrup commented 6 years ago

The ToString in HoffmanPavleyRankedShortestPathAlgorithm is implemented as

public override string ToString()
{
    return String.Format("{0} at {1} {2}", this.Weight, this.DeviationEdge);
}

This will obviously throw an exception as the number of arguments doesn't match the expected number in the format string.

As I'm not sure what the intended format is, I haven't submitted a PR to fix this.

KeRNeLith commented 4 years ago

In my fork I moved to string interpolation keeping the 3 args in a way similar to debugguer display (see here).