#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 dcoudert):
Unfortunately your proposal is slower than the implementation of this
patch.
With this patch:
{{{
sage: g = graphs.GridGraph([10,10]); g
Grid Graph for []: Graph on 100 vertices
sage: h = graphs.CubeGraph(8); h
8-Cube: Graph on 256 vertices
sage: %timeit gg = g.cartesian_product(h)
5 loops, best of 3: 1.31 s per loop
sage: %timeit gg = h.cartesian_product(g)
5 loops, best of 3: 1.31 s per loop
}}}
With your proposal on the same graphs:
{{{
sage: %timeit gg = g.cartesian_product(h)
5 loops, best of 3: 1.9 s per loop
sage: %timeit gg = h.cartesian_product(g)
5 loops, best of 3: 1.9 s per loop
}}
So I propose to stay with current implementation.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12770#comment:11>
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.