Opened 9 years ago
Closed 9 years ago
#11910 closed defect (fixed)
Connectivity of complete graphs
Reported by: | ncohen | Owned by: | jason, ncohen, rlm |
---|---|---|---|
Priority: | major | Milestone: | sage-5.0 |
Component: | graph theory | Keywords: | |
Cc: | Merged in: | sage-5.0.beta7 | |
Authors: | Nathann Cohen | Reviewers: | Jason Grout, David Coudert |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Fixes the problem reported at :
http://ask.sagemath.org/question/793/vertex-connecitivity-incomplete-pun-intended?answer=1306#1306
The connectvity of a complete graph is n-1. Currently, an exception is returned
Requires : #11367
Apply : trac_11910.patch
Attachments (1)
Change History (14)
comment:1 Changed 9 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
- Reviewers set to Jason Grout
comment:3 Changed 9 years ago by
- Status changed from needs_review to needs_work
- Work issues set to doctest rebase
comment:4 Changed 9 years ago by
Interestingly, when I pop the patch and rerun tests, I don't get those memory errors anymore, so maybe it is this patch causing the memory errors. Do you have any clue about what is going on?
comment:5 Changed 9 years ago by
comment:6 Changed 9 years ago by
- Status changed from needs_work to needs_info
Hmmm... Which kind of version are you using ? I applied the patch against alpha4 and there is nothing wrong there ! O_o
Nathann
comment:7 Changed 9 years ago by
- Status changed from needs_info to needs_review
comment:8 Changed 9 years ago by
- Reviewers changed from Jason Grout to Jason Grout, David Coudert
- Status changed from needs_review to needs_work
I have installed the patch with sage 5.0-beta4.
It is working correctly, but I also have a problem with the tests. This is a rounding problem. You should ensure that unweighted connectivity returns an integer.
sage -t "devel/sage-myclone/sage/graphs/generic_graph.py" IBM ILOG License Manager: "IBM ILOG Optimization Suite for Academic Initiative" is accessing CPLEX 12 with option(s): "e m b q ". ********************************************************************** File "/path-to-sage/sage-5.0.beta4/devel/sage-myclone/sage/graphs/generic_graph.py", line 7020: sage: g.vertex_connectivity() Expected: 9.0 Got: 9 ********************************************************************** 1 items had failures: 1 of 21 in __main__.example_85 ***Test Failed*** 1 failures. For whitespace errors, see the file /path-to-home/.sage//tmp/generic_graph_2957.py [53.6 s] ---------------------------------------------------------------------- The following tests failed: sage -t "devel/sage-myclone/sage/graphs/generic_graph.py" Total time for all tests: 53.6 seconds
comment:9 Changed 9 years ago by
- Status changed from needs_work to needs_review
Ahaahh. Actually for once it is the opposite : the function returns an integer, and a float was expected in the doctest... Of course the value returned is always an integer, as it is g.order()-1
. Stupid me
:-p
Thank you for the review ! Patch updated ! :-)
Nathann
Changed 9 years ago by
comment:10 follow-up: ↓ 11 Changed 9 years ago by
- Status changed from needs_review to positive_review
The patch now pass the tests successfully !
Install ok, docbuild ok, test ok, functionality ok => positive review.
D.
comment:11 in reply to: ↑ 10 Changed 9 years ago by
Install ok, docbuild ok, test ok, functionality ok => positive review.
Wouhouuuuuuu ! :-)
And it looks like ISGCI (#11880) should be included in Sage in a not so distant future :-)
Thanks !
Nathann
comment:12 Changed 9 years ago by
- Work issues doctest rebase deleted
comment:13 Changed 9 years ago by
- Merged in set to sage-5.0.beta7
- Resolution set to fixed
- Status changed from positive_review to closed
When testing on sage-4.8.alpha3, I get this (presumably from #11367):
Other than that, the code looks good. The MemoryErrors? look interesting, though. I don't think it's from this patch, but do you have any idea what it could be from?