#12770: cartesian product of directed graphs
-------------------------------------------+--------------------------------
Reporter: chapoton | Owner: jason, ncohen, rlm
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: graph theory | Resolution:
Keywords: directed graph, product | Work issues:
Report Upstream: N/A | Reviewers:
Authors: David Coudert | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------+--------------------------------
Comment (by chapoton):
''According to Nicolas Thiery :''
Once the graph G is created, the whole end of this method would be
best rewritten as something like:
G.add_vertices( (u,v) for u in self.vertex_iterator() for v in
other.vertex_iterator() )
G.add_edges( ((u,v), (u1,v)) for (u,u1) in self .edge_iterator()
for v in other.vertex_iterator() )
G.add_edges( ((u,v), (u,v1)) for (v,v1) in other.edge_iterator()
for u in self .vertex_iterator() )
I do not know if this is better, in any way, than what you wrote. Maybe
faster ?
If you do not want to spend more time on this ticket, I can give a
positive review for the current patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12770#comment:10>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.