Skip to content

Commit

Permalink
remove type check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Singer committed Oct 9, 2023
1 parent ffb43c9 commit d04edaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func CreatesCycle[K comparable, T any](g Graph[K, T], source, target K) (bool, e
// paths, an arbitrary one will be returned.
func ShortestPath[K comparable, T any](g Graph[K, T], source, target K) ([]K, error) {

if directedGraph, ok := g.(*directed[K, T]); ok && directedGraph.Traits().IsDirected {
if g.Traits().IsDirected {
return bellmanFord(g, source, target)
}

Expand Down

0 comments on commit d04edaa

Please sign in to comment.