Opened 5 years ago

Closed 5 years ago

#20800 closed defect (fixed)

The document of strongly_connected_components for Digraphs is not consistent with its behaviour

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-7.3
Component: graph theory Keywords:
Cc: Merged in:
Authors: David Coudert Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 65d7211 (Commits, GitHub, GitLab) Commit: 65d72117b723cdebdac59754eb8c35e9a5d5a4e3
Dependencies: Stopgaps:

Status badges

Description (last modified by tmonteil)

As reported in this ask question, the document says:

   This routine returns a pair "[nscc, scc]", where "nscc" is the
   number of SCCs and "scc" is a dictionary associating to each vertex
   "v" an integer between "0" and "nscc-1", corresponding to the SCC
   containing "v". SCCs are numbered in reverse topological order,
   that is, if "(v,w)" is an edge in the graph, "scc[v] <= scc[w]".

while the method returns a list of lists of vertices, see:

sage: G = digraphs.DeBruijn(2,2)
sage: G.strongly_connected_components()
[['00', '01', '10', '11']]
sage: G.strongly_connected_components?

The documentation itself shows examples of this, so the description should be updated, or the method (and examples) updated.

Change History (6)

comment:1 Changed 5 years ago by tmonteil

  • Description modified (diff)
  • Summary changed from The document of strongly_connected_components for Digraphs is incorrect to The document of strongly_connected_components for Digraphs is not consistent with its behaviour

comment:2 Changed 5 years ago by dcoudert

  • Branch set to u/dcoudert/20800

comment:3 Changed 5 years ago by dcoudert

  • Authors set to David Coudert
  • Commit set to 65d72117b723cdebdac59754eb8c35e9a5d5a4e3
  • Status changed from new to needs_review

This should do the job.


New commits:

65d7211trac #20800: update documentation

comment:4 Changed 5 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:5 Changed 5 years ago by dcoudert

Thank you. David.

comment:6 Changed 5 years ago by vbraun

  • Branch changed from u/dcoudert/20800 to 65d72117b723cdebdac59754eb8c35e9a5d5a4e3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.