Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Commit

Permalink
simple: fix directedness of DirectedDenseGraph.Edge
Browse files Browse the repository at this point in the history
Fixes #118.
  • Loading branch information
kortschak committed Sep 9, 2015
1 parent cf7ce3a commit 498ee19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple/dense_directed_matrix.go
Expand Up @@ -109,7 +109,7 @@ func (g *DirectedDenseGraph) HasEdgeBetween(x, y graph.Node) bool {
}

func (g *DirectedDenseGraph) Edge(u, v graph.Node) graph.Edge {
if g.HasEdgeBetween(u, v) {
if g.HasEdgeFromTo(u, v) {
return Edge{F: u, T: v, W: g.mat.At(u.ID(), v.ID())}
}
return nil
Expand Down

0 comments on commit 498ee19

Please sign in to comment.