#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):
> If you think you can implement a better immutable-only backend then
thats great.
Well, it's on the way : #14589 for dense graphs or for sparse graphes
http://www.sagemath.org/doc/reference/graphs/sage/graphs/base/static_sparse_graph.html
But these have been written for C implementations of time-consuming
algorithms. And thuse they do not support labels at all (which I
personally hate). But I intend to write general-purpose immutable backends
for these kinds of graphs in not so long, sooo...
> But chances are it won't be the best implementation in all cases (e.g.
dense vs. sparse).
Of course not. That's precisely why we have several backends.
> If the user-facing part of the immutability is in `GenericGraph_pyx`
then its easy to add an imutable backend next to mutable ones, the only
difference is that the constructor will already set the immutability flag
for the immutable backend(s).
Well, what I had in mind was something like that ``immutable_g = Graph(g,
immutable = True)``. Rather simple.
> Whereas duplicating the backends means twice as many bugs
Come on Volker. A backend has very few and very short functions. And
immutable data structure are the simplest of all. Are you scared of bugs ?
`:-P`
> and nothing to base Quivers on until you get around to implementing all
of them...
`O_o`
Having nothing to base Quivers on is probably the last of my worries.
Besides, it does not make much sense to have an immutable dense backend
that supports multiple edges and edge labels (they just contradict what
'dense' means), so only a sparse one will exist. No choice, no worry `:-P`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14535#comment:31>
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.