Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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 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 nthiery 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years 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>)

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 9 years ago by nthiery

  • Summary changed from Add support for DiGraph(<list of iterables>) to Add support for DiGraph(<dictionary of iterables>)

comment:3 Changed 9 years ago by davidloeffler

  • Reviewers set to David Loeffler
  • Status changed from needs_review to positive_review

comment:4 Changed 9 years ago by davidloeffler

  • Authors set to Nicolas M. Thiery

comment:5 Changed 9 years ago by nthiery

Thanks for the review!

comment:6 Changed 9 years 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).

comment:7 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.0.beta11
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:8 Changed 9 years ago by jdemeyer

  • Authors changed from Nicolas M. Thiery to Nicolas M. Thiéry
Note: See TracTickets for help on using tickets.