#7853 closed defect (fixed)
block_and_cut_vertices is inconsistent when graph has one vertex
Reported by: | jason | Owned by: | rlm |
---|---|---|---|
Priority: | major | Milestone: | sage-4.3.1 |
Component: | graph theory | Keywords: | |
Cc: | hartke, rlm, ncohen | Merged in: | sage-4.3.1.alpha2 |
Authors: | Nathann Cohen | Reviewers: | Robert Miller |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Currently, block_and_cut_vertices says that the vertex in a single-vertex graph is a cut vertex:
sage: Graph(1).blocks_and_cut_vertices() ([0], [0])
According to the definition of cut vertices given in the documentation of the function, a cut vertex, when removed, increases the connected components of the graph. Either that documentation should be changed to mention a corner case, or (preferably), the above computation should look like:
sage: Graph(1).blocks_and_cut_vertices() ([0], [])
Attachments (1)
Change History (5)
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
- Reviewers set to Robert Miller
- Status changed from needs_review to positive_review
Looks good to me.
comment:3 Changed 9 years ago by
- Merged in set to 4.3.1.alpha2
- Resolution set to fixed
- Status changed from positive_review to closed
comment:4 Changed 9 years ago by
- Merged in changed from 4.3.1.alpha2 to sage-4.3.1.alpha2
Note: See
TracTickets for help on using
tickets.
Here it is ! Actually the answer [0],[0] seemed deliberate in the code, but my tests with the patch applied did not show any error coming from the fix :-)
( Apply on top of patches from #7634 )
Nathann