#15627 closed defect (fixed)
(disjoint) Union of graphs with multiple edges
Reported by: | ncohen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.2 |
Component: | graph theory | Keywords: | |
Cc: | SimonKing, chapoton | Merged in: | |
Authors: | Nathann Cohen | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | 9f1716e (Commits) | Commit: | |
Dependencies: | #15623 | Stopgaps: |
Description (last modified by )
Err... Right now, the disjoint union of two graphs with multiedges/loops is the disjoint union of those two graphs without loops nor multiple edges. That's clearly missing from the code.
Here is the new behaviour
Multiple edges and loops:: sage: g = Graph(multiedges=True, loops=True) sage: g.add_edges(graphs.PetersenGraph().edges()) sage: g.add_edges(graphs.PetersenGraph().edges()) sage: g.add_edge(0,0) sage: g.add_edge(0,0,"Hey") sage: g.add_edge(0,9) sage: g.add_edge(0,9) sage: g.add_edge(0,9) sage: (2*g.size()) == (2*g).size() True Immutable input ? Immutable output:: sage: g = g.copy(immutable=True) sage: (2*g)._backend <class 'sage.graphs.base.static_sparse_backend.StaticSparseBackend'>
I hate multiedges. I hate loops. I hate labels.
Nathann
Change History (13)
comment:1 Changed 7 years ago by
- Branch set to u/ncohen/15627
- Dependencies changed from #15603 to #15623
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 7 years ago by
- Commit set to 6cb609d59f91eaeab786c5679969edaeec63b733
comment:3 Changed 7 years ago by
There is a typo "afinite projective plane"
I propose to replace "No other value is available for this parameter." by
"For the moment, no other value is available for this parameter."
comment:4 Changed 7 years ago by
oops, wrong ticket !
comment:5 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 7 years ago by
There is a failing doctest about the immutability :
sage: (2*g)._backend Traceback (most recent call last): ... NotImplementedError: An immutable graph does not change name
I suggest also to add a reference to :trac:`15627`
comment:7 Changed 7 years ago by
- Status changed from needs_review to needs_work
comment:8 Changed 7 years ago by
- Commit changed from 6cb609d59f91eaeab786c5679969edaeec63b733 to 9f1716eea045ef52356433458dc1c6b708fdf13e
comment:9 Changed 7 years ago by
- Status changed from needs_work to needs_review
Here it is !
Nathann
comment:10 Changed 7 years ago by
- Reviewers set to Frédéric Chapoton
- Status changed from needs_review to positive_review
Ok, good enough for me (even if not fully pep8 or python3)
:)
comment:11 Changed 7 years ago by
Ahahah. Thanks for the review :-)
Nathann
comment:12 Changed 7 years ago by
- Branch changed from u/ncohen/15627 to 9f1716eea045ef52356433458dc1c6b708fdf13e
- Resolution set to fixed
- Status changed from positive_review to closed
comment:13 Changed 5 years ago by
- Commit 9f1716eea045ef52356433458dc1c6b708fdf13e deleted
- Description modified (diff)
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
trac #15627: (disjoint) Union of graphs with multiple edges
trac #15623: Immutable graph backend for Posets
trac #15622: Immutable graphs must not be relabeled
trac #15619: bug in the former definition; exception to avoid it in the future
trac #15619: Pickling of immutable graphs
trac #15603: "immutable=True" for Graph/Digraph __init__ and copy()
Trac 15278: Fix syntax error in doc test
Trac 15278: Only graphs that use the static backend are identical with their copy
Merge branch 'develop' into ticket/15278
Trac 15278: Error messages explain how to create (im)mutable graph copy