#6578: [with patch, needs review] fast subgraphs by building the graph instead
of
deleting things
--------------------------+-------------------------------------------------
Reporter: jason | Owner: rlm
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.1
Component: graph theory | Keywords:
Reviewer: | Author: Jason Grout
Merged: |
--------------------------+-------------------------------------------------
Comment(by jason):
Most of the time delete is faster than add; that's why I set the factor so
that if we want more than 5% of the vertices, it does delete.
I think delete copies the graph, which doesn't *add* every edge, but
probably just copies the edge dictionary, which should be *way* faster.
The tests I was taking my data from was doing
{{{
sage: g=graphs.PathGraph(1000)
}}}
and then doing {{{g.subgraph(range(i)}}} using each of the algorithms.
The breakeven point seemed to be between 50 and 100. I also did this with
the complete graph, and got similar results.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6578#comment:4>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---