#15662: Ihara zeta function of graphs
-------------------------+-------------------------------------------------
Reporter: | Owner:
chapoton | Status: needs_info
Type: | Milestone: sage-6.1
enhancement | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: zeta | Commit:
function | b2c1e310c03477183cb3e793103711989955eb57
Authors: | Stopgaps:
Frédéric Chapoton |
Report Upstream: N/A |
Branch: |
u/chapoton/15662 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Okay I read the Mathoverflow thread a bit, and I think that the shortest
way for you is to do this :
{{{
labeled_g = Graph()
labeled_g.add_edges([(u,v,i) for i,(u,v) in
enumerate(g.edges(labels=False))]) # faster than giving the edges when the
graph is being built. Don't ask.
for v in labeled_g:
for vv,u,i in labeled_g.edges_incident(v):
if v != vv: raise RuntimeError("Should Not Happen")
# do what you have to, now that you know the labels of your edges.
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15662#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.