#6041: [with spkg, needs work] update NetworkX to version 0.99
--------------------------+-------------------------------------------------
Reporter: mvngu | Owner: rlm
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.0.1
Component: graph theory | Keywords:
--------------------------+-------------------------------------------------
Comment(by rlm):
Replying to [comment:3 mvngu]:
> I managed to get all doctests in
{{{sage/graphs/base/graph_backends.py}}} to pass, but at the expense of
deleting the following methods from the class {{{NetworkXGraphBackend}}}.
Here I assume that {{{NetworkXGraphBackend}}} is an undirected graph
without multiple edges.
Incorrect. NetworkXGraphBackend is simply a wrapper for a NetworkX graph,
which can be directed, or have multiple edges.
> 1. {{{loops}}} -- This is irrelevant with the API changes in NetworkX
0.99, since the class {{{Graph}}} from NetworkX 0.99 allows for self-loops
without having to explicitly set it with a boolean.
> 1. {{{multiple_edges}}} -- Again irrelevant since the class {{{Graph}}}
doesn't allow multiple edges. Graphs with multiple edges should now be
constructed via the class {{{MultiGraph}}} (not directed), or
{{{MultiDiGraph}}} which allows for directed arcs.
This isn't irrelevant, as *Sage* graphs can have loops or multiedges set.
What needs to happen is for loops and multiedges to become properties of
the backend, and for the appropriate work to go on there. We still need to
support these options. You should be working on top of the `part-1` patch
at #6085, since it implements part of this in `graph.py` (and so that
we're less likely to be stepping on each other's toes).
> Here's a diff of the changes to `sage/graphs/base/graph_backends.py`:
Next time you could probably attach the diff to the ticket... :)
> It looks like anything under {{{sage/graphs/}}} that uses
{{{sage/graphs/base/graph_backends.py}}} should be changed accordingly.
Don't forget all of the rest of Sage! I think you'll find it much easier
to adapt the backend to behave exactly as before. Then, all the other
doctests should pass - that's what they're there for!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6041#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---