Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7d6491a

Browse files
authored
Merge pull request #3 from press0/patch-1
edge direction bug
2 parents 34e4465 + 4f21e57 commit 7d6491a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎graph_implementations/graph_edge_list.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def add_edge(self, node1_name, node2_name, weight=1):
4545
# If a graph is undirected, add the same edge,
4646
# but also in the opposite direction
4747
if not self.m_directed:
48-
self.m_graph.append([node1, node2, weight])
48+
self.m_graph.append([node2, node1, weight])
4949

5050
###################################
5151
# Print a graph representation

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /