#15862: Mutability of tableaux, for the n-th time
-------------------------------------------------+-------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: combinatorics | Resolution:
Keywords: tableaux, sage-combinat, | Merged in:
mutability | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by tscrim):
Replying to [comment:8 darij]:
> @Nicolas: Thank you. Can you remind me how `ClonableList` differs from
`CombinatorialObject`? Does it allow mutation at clone time?
One is that `ClonableList` is cythonized
> Currently tableaux can have non-integer entries, and this is both useful
and used (e.g. for skew tableaux). So I'm not convinced of switching to C
ints.
I would not switch to C ints since we I believe the crystals of tableaux
are filled with wrappers around ints. In either case, it is very
conceivable to me that we would want non C ints as entries.
> @Travis: Apparently combinatorial objects hash like this:
> {{{
> if self._hash is None:
> self._hash = str(self._list).__hash__()
> return self._hash
> }}}
> So the `__repr__` is not used, but rather the list is taken into a
string and the latter is hashed. I assume this won't take any longer with
tuples? Or am I looking at the wrong hash function?
The `__str__()` ends up calling the `__repr__()`, and then the resulting
string is hashed since we can't just hash lists. For tuples, we can just
call `hash(self._list)`.
> Thanks also for your comments on #14711, though they're still somewhat
over my head. What morphisms hold a weak reference to `Tableaux()`?
*shrugs* Actually those parents aren't being recreated on startup, I
misremembered / misread Simon's comment. It's about when running all
tests. There might be some dependency cycle (perhaps directly in the
morphism, but maybe not) which creates a tableau (and hence `Tableaux()`)
that becomes completely weakly referenced with #14711 and so it gets
garbage collected. *shrugs* IDK, it would require some detailed searching
and analysis.
--
Ticket URL: <http://trac.sagemath.org/ticket/15862#comment:9>
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/d/optout.