#15278: Hash and equality for graphs
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.13
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/SimonKing/ticket/15278 | 07bad466ab9a3e2ffe82c142cc6d0c515f1ae452
Dependencies: #12601, #15491 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
> If the static graph backend is used, then `self.delete_vertex(vertex)`
and similar mutating methods will result in an error raised by the
backend.
If this thing is the code of `.delete_vertex` then we have a lot of things
to worry about. WHY THE HELL is this thing building a list of size
`number_of_vertices` for the `_boundary` operation EACH TIME A VERTEX IS
REMOVED ? `O_O`
Anyway. What you want to do is a good way out. Adding a decorator to
`set_boundary` and making it called by this function would do the job too.
But the first important thing to do is to replace this stupid creation of
a new list with a call to `list.remove` or something, in order to NOT
create a list each time a vertex is deleted.
Fortunately this list is always empty. I should deprecate and remove this
thing, that's what I should do. Nobody know why it's here for, it's
awfully undocumented. This thing should be removed `>_<`
So yeah, you can fix your problem by relying on the exception thrown by
the backend. And I'll write a patch to deprecate this stupid boundary
thing.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15278#comment:25>
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.
For more options, visit https://groups.google.com/groups/opt_out.