def __iter__(self): """ EXAMPLES:: sage: sp = SkewPartitions(3).list() sage: SemistandardMultiSkewTableaux([SkewPartition([[1, 1, 1], []]), SkewPartition([[3], []])],[2,2,2]).list() [[[[1], [2], [3]], [[1, 2, 3]]]] :: sage: a = SkewPartition([[8,7,6,5,1,1],[2,1,1]]) sage: weight = [3,3,2] sage: k = 3 sage: s = SemistandardMultiSkewTableaux(a.quotient(k),weight) sage: len(s.list()) 34 sage: RibbonTableaux(a,weight,k).cardinality() 34 """ parts = self._shape mu = self._weight #Splitting the partition s = [p.size() for p in parts] parts = [p.to_list() for p in parts] #Gluing the partitions parttmp = parts[0] i = 1 for i in range(1, len(parts)): trans = parttmp[0][0] current_part = parts[i] current_part[1] += [0] * (len(current_part[0]) - len(current_part[1])) inner_current = [trans + j for j in current_part[1]] outer_current = [trans + j for j in current_part[0]] parttmp = [outer_current + parttmp[0], inner_current + parttmp[1]] #List the corresponding skew tableaux l = [st.to_word() for st in SemistandardSkewTableaux(parttmp, mu)] S = SkewTableaux() for k in range(len(l)): pos = 0 #Double check this restmp = [ S.from_shape_and_word(parts[0], [l[k][j] for j in range(s[0])]) ] for i in range(1, len(parts)): w = [ l[k][j] for j in range(pos + s[i - 1], pos + s[i - 1] + s[i]) ] restmp.append(S.from_shape_and_word(parts[i], w)) yield self.element_class(self, restmp)
def __iter__(self): """ EXAMPLES:: sage: sp = SkewPartitions(3).list() sage: SemistandardMultiSkewTableaux([SkewPartition([[1, 1, 1], []]), SkewPartition([[3], []])],[2,2,2]).list() [[[[1], [2], [3]], [[1, 2, 3]]]] :: sage: a = SkewPartition([[8,7,6,5,1,1],[2,1,1]]) sage: weight = [3,3,2] sage: k = 3 sage: s = SemistandardMultiSkewTableaux(a.quotient(k),weight) sage: len(s.list()) 34 sage: RibbonTableaux(a,weight,k).cardinality() 34 """ parts = self._shape mu = self._weight #Splitting the partition s = [ p.size() for p in parts ] parts = [p.to_list() for p in parts] #Gluing the partitions parttmp = parts[0] i = 1 for i in range(1,len(parts)): trans = parttmp[0][0] current_part = parts[i] current_part[1] += [0]*(len(current_part[0])-len(current_part[1])) inner_current = [ trans + j for j in current_part[1] ] outer_current = [ trans + j for j in current_part[0] ] parttmp = [ outer_current + parttmp[0], inner_current + parttmp[1] ] #List the corresponding skew tableaux l = [ st.to_word() for st in SemistandardSkewTableaux(parttmp, mu) ] S = SkewTableaux() for k in range(len(l)): pos = 0 #Double check this restmp = [ S.from_shape_and_word(parts[0], [l[k][j] for j in range(s[0])]) ] for i in range(1, len(parts)): w = [l[k][j] for j in range(pos+s[i-1], pos+s[i-1]+s[i])] restmp.append( S.from_shape_and_word(parts[i], w) ) yield self.element_class(self, restmp)