Ticket #12653 (closed enhancement: fixed)

Opened 15 months ago

Last modified 14 months ago

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

trac_12653-graph_from_dictionary_of_iterables-nt.patch Download (2.7 KB) - added by nthiery 15 months ago.

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

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

comment:3 Changed 15 months ago by davidloeffler

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

comment:4 Changed 15 months ago by davidloeffler

  • Authors set to Nicolas M. Thiery

comment:5 Changed 15 months ago by nthiery

Thanks for the review!

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

comment:7 Changed 15 months ago by jdemeyer

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

comment:8 Changed 14 months ago by jdemeyer

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