#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 | c774057bf07b2da8539f2395555b2062428874f4
Dependencies: #12601 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
Yooooooooo !!!
> - The methods mentioned above call the backend, namely:
> 1. `._backend.multiple_edges(None)
> 2. `._backend.loops(None)`
> 3. `._backend.num_verts()`
> 4. `._backend.num_edges(self._directed)`
>
> So, my question boils down to this, Nathann: Is it possible for the
static backend that the return value of the above methods 1.--4. changes,
if the user is only using non-underscore methods on the graph?
Nope. `multiple_edges` and `loops` will give you the list of multiple
edges and loops, and that cannot change if the adjacencies do not change,
so that's ok. Aaaaand the same goes with the number of vertices and edges,
so you're fine !
> If it is not possible, then the `__eq__` classes won't change when using
the static graph backend, and I am happy.
You can't be Happy. This guy is already named Happy, and there can't be
two.
http://fairytail.wikia.com/wiki/Happy
> The hash only takes into account the tuple of vertices and edges (which
includes their labels). You have already confirmed that this is fine with
the static backend.
While saying each time that the labels *CAN* change if they are lists and
that the users append/remove things from them. But indeed `:-P`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15278#comment:16>
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.