Changes between Initial Version and Version 3 of Ticket #5538


Ignore:
Timestamp:
04/09/09 20:43:18 (13 years ago)
Author:
hivert
Comment:

Since the file is moved, the patch is not very useful. I added a diff from the former sage/combinat/family.py to the new sage/sets/family.py. It is *not* a patch and should not be applied.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5538

    • Property Summary changed from Family does not copy it's input. to [with patch; needs review] Family does copy its input + various improvement.
  • Ticket #5538 – Description

    initial v3  
    1 When family got a dictionary it does not copy it's input so that one can modify it. One should use a kind of frozen dictionary.
     1When family got a dictionary it does not copy it's input so that one can modify it. Before the patch we had the following wrong behavior:
    22{{{
    33sage: d = {1:"a", 3:"b", 4:"c"}
    4 sage: f = Family(d)
    5 sage: f
     4sage: f = Family(d); f
    65Finite family {1: 'a', 3: 'b', 4: 'c'}
    7 sage: d.
    86sage: d[2] = 'DD'
    9 sage: d
    10 {1: 'a', 2: 'DD', 3: 'b', 4: 'c'}
    117sage: f
    128Finite family {1: 'a', 2: 'DD', 3: 'b', 4: 'c'}
    139}}}
     10This is now corrected.
    1411
    15 Florent
     12The second improvement is that list, and tuple can now be transformed to family indexed by `0..n` with the class TrivialFamily;
     13
     14The third improvement is that FiniteCombinatorialClass is now fully compatible with family.
     15
     16A Fourth improvement is that for lazy family the pickling of the  function or the attrcall is done as far as possible. And example of a case where it is not possible to work has been added.   
     17
     18Finally since family has noting to do with combinatorics, I moved this to the more sensible sage.set. 
     19
     20Author: Florent Hivert