Ticket #12653 (closed enhancement: fixed)
Add support for DiGraph(<dictionary of iterables>)
| Reported by: | nthiery | Owned by: | jason, ncohen, rlm |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.0 |
| Component: | graph theory | Keywords: | |
| Cc: | sage-combinat | Work issues: | |
| Report Upstream: | N/A | Reviewers: | David Loeffler |
| Authors: | Nicolas M. Thiéry | Merged in: | sage-5.0.beta11 |
| Dependencies: | Stopgaps: |
Description
Allow for:
sage: g = DiGraph({0:(1,2,3), 2:(4)}); g
Digraph on 5 vertices
Currently this is either not accepted, or gives an nonsensical output:
sage: DiGraph({0:set([1,2,3]), 2:set([4])}).edges()
[(0, 1, {0: {}}), (0, 2, {0: {}}), (0, 3, {0: {}}), (2, 4, {0: {}})]
Attachments
Change History
comment:1 Changed 15 months ago by nthiery
- Status changed from new to needs_review
- Summary changed from Add support for DiGraph(<list of iterable>) to Add support for DiGraph(<list of iterables>)
comment:2 Changed 15 months ago by nthiery
- Summary changed from Add support for DiGraph(<list of iterables>) to Add support for DiGraph(<dictionary of iterables>)
Changed 15 months ago by nthiery
-
attachment
trac_12653-graph_from_dictionary_of_iterables-nt.patch
added
comment:3 Changed 15 months ago by davidloeffler
- Status changed from needs_review to positive_review
- Reviewers set to David Loeffler
comment:6 Changed 15 months ago by nthiery
For the record: I had a look at the "apply failed" on 5.0.beta8, and it's simply due to a network error during the download of the patch (I guess that was when trac was down the other day). The patch does apply smoothly (also on 5.0.beta10).
Note: See
TracTickets for help on using
tickets.

Note: #12518 currently depends on this patch (but it could use some other mean). See discussion on sage-combinat-devel:
https://groups.google.com/forum/?fromgroups#!topic/sage-combinat-devel/z3yiohqFf88