Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strongly_connected_components_digraph's had no edges #9485

Closed
nthiery opened this issue Jul 12, 2010 · 5 comments
Closed

strongly_connected_components_digraph's had no edges #9485

nthiery opened this issue Jul 12, 2010 · 5 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Jul 12, 2010

Graphs produced with strongly_connected_components_digraph had no
edges in them due to a typo in the code:

    sage: g = DiGraph({0:[1,2,3],1:[2],2:[1,3]})
    sage: scc_digraph = g.strongly_connected_components_digraph()
    sage: scc_digraph.vertices()
    [{0}, {3}, {1, 2}]
    sage: scc_digraph.edges()
    []

After this patch, the result is more likely to be correct:

    [({0}, {3}, None), ({0}, {1, 2}, None), ({1, 2}, {3}, None)]

CC: @sagetrac-sage-combinat @rlmill

Component: graph theory

Keywords: strongly connected components

Author: Nicolas M. Thiéry

Reviewer: Nathann Cohen

Merged: sage-4.5.2.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/9485

@nthiery
Copy link
Contributor Author

nthiery commented Jul 12, 2010

@nthiery nthiery changed the title Fix strongly_connected_components_digraph to actually do something strongly_connected_components_digraph had no edges Jul 12, 2010
@nthiery nthiery changed the title strongly_connected_components_digraph had no edges strongly_connected_components_digraph's had no edges Jul 12, 2010
@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Jul 12, 2010

comment:3

Oops... Some very, very bad typo ... Thank youuuuuuu ! :-)

Nathann

@nthiery
Copy link
Contributor Author

nthiery commented Jul 13, 2010

Changed reviewer from Robert Miller to Nathann Cohen

@nthiery
Copy link
Contributor Author

nthiery commented Jul 13, 2010

comment:4

Thanks for the instantaneous review!

And thanks as well for the original code. It was still quicker for me to fix it than to have to implement it myself :-)

@qed777
Copy link
Mannequin

qed777 mannequin commented Jul 21, 2010

Merged: sage-4.5.2.alpha0

@qed777 qed777 mannequin removed the s: positive review label Jul 21, 2010
@qed777 qed777 mannequin closed this as completed Jul 21, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants