#14535: Mutability of Graphs
--------------------------------------------+-------------------------------
Reporter: SimonKing | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.10
Component: graph theory | Resolution:
Keywords: mutability graph | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Simon King, Volker Braun | Merged in:
Dependencies: #14524 | Stopgaps:
--------------------------------------------+-------------------------------
Comment (by ncohen):
> Another backend for immutable NetworkX graphs, another backend for
immutable dense graphs, another backend for immutable sparse graphs? Thats
crazy.
?
Welll..... That makes one backend per data structure. How crazy is that ?
`O_o`
> We could move the mutability stuff to the base `GenericGraphBackend` but
then we still have to push the actual check into each backend. Its a
possibility, but it does include quite a bit of copy&pasting.
Yep. That's precisely why I don't like it. To me the only way to implement
this cleanly and efficiently is to write a backend for that.
Because you can store data much better, and write much more efficient
methods for edge queries and neighbor listings when you know that your
data will never change. Just write all of it in a big sorted C array.
This way you have no need to copy/paste anything, and you actually gain
performance by using the fact that your data will never change.
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14535#comment:29>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.