[sage-devel] Re: Why does FiniteLatticePoset sometimes makes copies?

2019-10-30 Thread 'Jonathan Kliem' via sage-devel
Ok, thanks again. Using the construction parameters is definitely an option and I will change it soon. Am Mittwoch, 30. Oktober 2019 22:59:34 UTC+1 schrieb Nils Bruin: > > On Wednesday, October 30, 2019 at 2:31:37 PM UTC-7, Jonathan Kliem wrote: >> >> Basically, I can just do it like this. Now,

[sage-devel] Re: Why does FiniteLatticePoset sometimes makes copies?

2019-10-30 Thread Nils Bruin
On Wednesday, October 30, 2019 at 2:31:37 PM UTC-7, Jonathan Kliem wrote: > > Basically, I can just do it like this. Now, if I understand it correctly: > > Face lattice as it is, should not be cached. Instead its probably fine to > store the version with indices and convert on each call. Or the

[sage-devel] Re: Why does FiniteLatticePoset sometimes makes copies?

2019-10-30 Thread 'Jonathan Kliem' via sage-devel
Thanks. I think I have it figured out now. The current construction passes to the face lattice the ID of self as a key. This is why F1 and F2 are not identical. Basically, I can just do it like this. Now, if I understand it correctly: Face lattice as it is, should not be cached. Instead its

[sage-devel] Re: Why does FiniteLatticePoset sometimes makes copies?

2019-10-30 Thread Nils Bruin
I haven't dug very deep into this, but the following looks suspicious: sage: o1 = lattice_polytope.cross_polytope(3) sage: o2 = lattice_polytope.cross_polytope(3) sage: o1==o2 True sage: o1 is o2 False This in itself isn't a problem, but o1.face_lattice() is a UniqueRepresentation object. That