Opened 13 years ago
Last modified 12 years ago
#7378 closed enhancement
Subdivide edges in a graph — at Version 5
Reported by: | ncohen | Owned by: | jason |
---|---|---|---|
Priority: | major | Milestone: | sage-4.5 |
Component: | graph theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
It is often useful to subdivide the edges of a graph, so there should be a function in Sage for this.
When an edge e between u and v is subdivided in a DiGraph?, perhaps the best thing to do would be to name the new vertices as (e, 0), (e, 1), (e, 2), etc ...
We are left with a similar problem concerning the Graphs and here I have to admit I do not know which name to use without inducing some orientation..
This being said, it has to be done ! :-)
Change History (5)
comment:1 Changed 12 years ago by
- Report Upstream set to N/A
- Status changed from new to needs_review
comment:2 Changed 12 years ago by
- Owner changed from rlm to jason
In the docs, you say that the following are valid forms:
G.add_edge( 1, 2, 8 )
G.add_edge( (1, 2), 8 )
However, reading the code seems to indicate that it should be subdivide_edge, not add_edge.
comment:3 Changed 12 years ago by
Indeed. Fixed :-)
Nathann
comment:4 Changed 12 years ago by
- Description modified (diff)
comment:5 Changed 12 years ago by
- Description modified (diff)
I just applied this patch on top of #7608, and there was nothing wrong to report :-)
Here it is !!!
Nathann