#12587: simplicial complexes lack hash function
------------------------------------+---------------------------------------
Reporter: vpilaud | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.4
Component: combinatorics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Travis Scrimshaw | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by tscrim):
Replying to [comment:17 jhpalmieri]:
> Replying to [comment:16 tscrim]:
> >
> > Doing that would fix it. However some of the methods in
SimplicialComplex use `add_face()` (as I recall `_enlarge_subcomplex()` is
the main culprit), so it'd cut down on the number of transient objects.
Also I feel like this is becomes consistent with `Graph` (and by my
understanding `Sequence` and `Matrix`).
>
> For what it's worth, I just searched through simplicial_complex.py, and
I don't see `add_face()` used anywhere except for some doctests.
>
> I think consistency with other classes is secondary. I think the central
question is: is there a good reason for simplicial complexes to be
mutable?
A priori, no. You're right, I could not find any code either (I looked
through both the homology and combinat directories) which used
`add_face()` other than for the doc-tests. I feel like there are many
constructions which iteratively build-up simplicial complexes or break
them down piece by piece (such as k-decomposeability) and creating copies
would create transient objects and inflate the memory usage. This is why I
feel that we should have SimplicialComplex be mutable.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12587#comment:18>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.