#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 | Merged in:
Dependencies: #14524 | Stopgaps:
------------------------------------+---------------------------------------
Comment (by ncohen):
> `sage.graphs.generic_graph.GenericGraph.delete_vertex`, which is
> {{{
> for attr in attributes_to_update:
> if hasattr(self, attr) and getattr(self, attr) is not None:
> getattr(self, attr).pop(vertex, None)
> self._boundary = [v for v in self._boundary if v != vertex]
> }}}
> and only afterwards calls the backend.
Oh, yeah.. The boundary is stored by graphs, too `>_<`
> If the order of dealing with attributes and dealing with the backend
could be reversed, then making the backend immutable would be enough. But
in this order, calling the method on an immutable graph backend would
destroy some data ''before'' raising the error.
>
> Perhaps I should have tried first whether it ''can'' be reversed...
Hmmmmmm. First I would like to know something : do you really want
everything in the graph to be immutable ? Or only edges and vertices ?
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14535#comment:12>
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.