Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#12653 closed enhancement (fixed)

Add support for DiGraph(<dictionary of iterables>)

Reported by: Nicolas M. Thiéry Owned by: jason, ncohen, rlm
Priority: major Milestone: sage-5.0
Component: graph theory Keywords:
Cc: Sage Combinat CC user Merged in: sage-5.0.beta11
Authors: Nicolas M. Thiéry Reviewers: David Loeffler
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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 (1)

trac_12653-graph_from_dictionary_of_iterables-nt.patch (2.7 KB) - added by Nicolas M. Thiéry 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by Nicolas M. Thiéry

Status: newneeds_review
Summary: Add support for DiGraph(<list of iterable>)Add support for DiGraph(<list of iterables>)

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

comment:2 Changed 11 years ago by Nicolas M. Thiéry

Summary: Add support for DiGraph(<list of iterables>)Add support for DiGraph(<dictionary of iterables>)

Changed 11 years ago by Nicolas M. Thiéry

comment:3 Changed 11 years ago by David Loeffler

Reviewers: David Loeffler
Status: needs_reviewpositive_review

comment:4 Changed 11 years ago by David Loeffler

Authors: Nicolas M. Thiery

comment:5 Changed 11 years ago by Nicolas M. Thiéry

Thanks for the review!

comment:6 Changed 11 years ago by Nicolas M. Thiéry

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).

comment:7 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-5.0.beta11
Resolution: fixed
Status: positive_reviewclosed

comment:8 Changed 10 years ago by Jeroen Demeyer

Authors: Nicolas M. ThieryNicolas M. Thiéry
Note: See TracTickets for help on using tickets.