KeRNeLith / QuikGraph

Generic Graph Data Structures and Algorithms for .NET
https://kernelith.github.io/QuikGraph/
Microsoft Public License
453 stars 65 forks source link

Modify YenShortestPathsAlgorithm to support generic Edge type #84

Open SkylineThomasCR opened 4 months ago

SkylineThomasCR commented 4 months ago

YenShortestPathsAlgorithm currently requires Edges to be of type EquatableTaggedEdge<TVertex, double>. The reason for this seems to be related to how weights were provided in older versions.

This change will allow any type that implements IEdge. This change does make the edgeWeights parameter mandatory. This change also requires an additional type parameter to be specified by the user.