#12770: cartesian product of directed graphs
-------------------------------------------+--------------------------------
Reporter: chapoton | Owner: jason, ncohen, rlm
Type: defect | Status: positive_review
Priority: major | Milestone: sage-5.0
Component: graph theory | Resolution:
Keywords: directed graph, product | Work issues:
Report Upstream: N/A | Reviewers: Frédéric Chapoton
Authors: David Coudert | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------+--------------------------------
Comment (by dcoudert):
Replying to [comment:14 nthiery]:
> Replying to [comment:11 dcoudert]:
> > Unfortunately your proposal is slower than the implementation of this
patch.
>
> Interesting that calling repeatedly add_edge is faster than add_edges!
The point is that using add_edges, we first create a new list of edges,
and then iterate this list to add edges to the new graph. So somehow we do
the job twice. My tests suggest that current implementation is a bit
faster.
> I am fine with the current implementation, though maybe using
edge_iterator would be faster, since the former does a sort (which I don't
like but that's another story). I let you see if you want to do that.
I have changed the patch to use the edge_iterator. It is now slightly
faster (few ms less on large graphs).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12770#comment:15>
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.