Package sage :: Package combinat :: Module kshape
[hide private]
[frames] | no frames]

Module kshape

source code



k-shapes

The k-interior of a partition is the subpartition whose
cells have hook sizes greater than k. 
The k-boundary of a partition is the skew shape
given by the partition minus its k-interior.
The row (resp. column) shape of a partition
is the composition whose i-th part is the
number of cells in the i-th row (resp. column) of the
k-boundary. A partition is a k-shape if both its
row shape and column shape are partitions.

EXAMPLES:

  Construct the 3-shape from the partition [4,3,2,2,1,1].

    sage: x = KShape([4,3,2,2,1,1],3)

    sage: x.outer_shape
    [4, 3, 2, 2, 1, 1]

  The k-interior is called inner_shape.

    sage: x.inner_shape
    [2, 2, 1, 1]

    sage: x.row_shape
    [2, 1, 1, 1, 1, 1]

    sage: x.column_shape
    [2, 2, 2, 1]



Classes [hide private]
  KShape_class
Functions [hide private]
 
my_flatten(lislis)
flattens by one level (joins a listlist into a list)
source code
 
partition_part(p, i) source code
 
zero_extend(mu, l)
Returns list mu unless its length is less than l, in which case zeroes are appended to mu to make its length equal to l.
source code
 
partition_difference(la, mu)
Difference of two lists of integers assuing len(la) >= len(mu).
source code
 
diagonal_index(x)
Given a cell x=[r,c], return its diagonal index c-r.
source code
 
is_partition(p)
Is a list of integers a list of weakly decreasing nonnegative integers?
source code
 
k_strings_max(outer, k) source code
 
adjoin_cells(p, cells)
cells is a list of pairs of nonnegative integers.
source code
 
KShape(outer, k)
Create a kshape object defined by its outer shape
source code
Function Details [hide private]

partition_difference(la, mu)

source code 

Difference of two lists of integers assuing len(la) >= len(mu).
If len(la)>len(mu) then append zeroes to mu and then subtract.

adjoin_cells(p, cells)

source code 

cells is a list of pairs of nonnegative integers.
p is a list of integers.
For each [r,c] in cells, increment the part r of p.
If r >= the current length of the list,
adjoin 1 to the list.