#13072: Implementation of PartitionTuple + some minor fixes to partition.py
----------------------------------------+-----------------------------------
Reporter: andrew.mathas | Owner: Andrew Mathas
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.3
Component: combinatorics | Resolution:
Keywords: tuples of partitions | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Andrew Mathas | Merged in:
Dependencies: #9265 | Stopgaps:
----------------------------------------+-----------------------------------
Description changed by andrew.mathas:
Old description:
> This patch implements the following classes:
>
> * PartitionTuple - returns a tuple of partitions
> * PartitionTuples - factory class for all tuples of partitions
> * PartitionTuples_level - class of all tuples of partition of a fixed
> level
> * PartitionTuples_size - class of all tuples of partition of a
> fixed size
> * PartitionTuples_level_size - class of all tuples of partition of a
> fixed level and size. The first three of these are infinite enumerated
> classes whereas the last is finite. They all have iterators.
>
> The idea is to implement a fully function class for PartitionTuples as I
> currently need this together with a class for tuples of (standard)
> tableaux (coming soon).
>
> PartitionTuples of level 1 are in natural bijection with Partitions so
> when given a 1-tuple of partitions or a partition PartitionTuples()
> returns the corresponding Partition. This works almost seamlessly, making
> it possible to almost ignore the distinction between Partitions() and
> PartitionTuples(). One exception is that the expected behaviour of
>
> {{{
> for component in mu:
> do X
>
> }}}
> is different for partitions and partition tuples (in the first case, you
> expect to loop over the pars of the partition and in the second over the
> component of the tuple). To get around this both classes now have a
> components() method so that you can uniformly write
>
> {{{
> for nu in mu.components():
> do X
> }}}
> mprovements welcome!
>
> In terms of implementation, for my use of these objects the `level` is
> more intrinsic than the size so I have set the syntax for the
> PartitionTuples classes as
>
> {{{
> PartitionTuples(level=l, n=n)
> }}}
> where `level` and `n` are both optional named arguments BUT level is
> specified first. Previously, `n` was given first and `level` second. I
> think that it makes much more sense this way around, but if people feel
> really strongly about this I will change it back. Previously, `level` was
> just called `k`, which is a fairly random variable whereas `level` makes
> sense in terms of categorification and higher level Fock spaces.
> (Replacing `n` with `size` would also be sensible but I didn't go there.)
>
> Finally, in addition to these new classes as discussed previously on
> sage-combinat I have removed a bunch functions which were depreciated
> years ago. I also added normal_nodes() and good_nodes methods to
> Partition_class and reinstated the beta_numbers() methods which were
> removed in the last patch to partition.py (this patch said that
> beta_numbers and frobenius_coordinates are identical objects, but they
> are actually different).
>
> Apply: trac_13072-tuples-of-partitions_am.patch
New description:
This patch implements the following classes:
* PartitionTuple - returns a tuple of partitions
* PartitionTuples - factory class for all tuples of partitions
* PartitionTuples_level - class of all tuples of partition of a fixed
level
* PartitionTuples_size - class of all tuples of partition of a
fixed size
* PartitionTuples_level_size - class of all tuples of partition of a
fixed level and size. The first three of these are infinite enumerated
classes whereas the last is finite. They all have iterators.
The idea is to implement a fully function class for PartitionTuples as I
currently need this together with a class for tuples of (standard)
tableaux (coming soon).
PartitionTuples of level 1 are in natural bijection with Partitions so
when given a 1-tuple of partitions or a partition PartitionTuples()
returns the corresponding Partition. This works almost seamlessly, making
it possible to almost ignore the distinction between Partitions() and
PartitionTuples(). One exception is that the expected behaviour of
{{{
for component in mu:
do X
}}}
is different for partitions and partition tuples (in the first case, you
expect to loop over the pars of the partition and in the second over the
component of the tuple). To get around this both classes now have a
components() method so that you can uniformly write
{{{
for nu in mu.components():
do X
}}}
mprovements welcome!
In terms of implementation, for my use of these objects the `level` is
more intrinsic than the size so I have set the syntax for the
PartitionTuples classes as
{{{
PartitionTuples(level=l, n=n)
}}}
where `level` and `n` are both optional named arguments BUT level is
specified first. Previously, `n` was given first and `level` second. I
think that it makes much more sense this way around, but if people feel
really strongly about this I will change it back. Previously, `level` was
just called `k`, which is a fairly random variable whereas `level` makes
sense in terms of categorification and higher level Fock spaces.
(Replacing `n` with `size` would also be sensible but I didn't go there.)
Finally, in addition to these new classes as discussed previously on sage-
combinat I have removed a bunch functions which were depreciated years
ago. I also added normal_nodes() and good_nodes methods to Partition_class
and reinstated the beta_numbers() methods which were removed in the last
patch to partition.py (this patch said that beta_numbers and
frobenius_coordinates are identical objects, but they are actually
different).
'''Apply:''' [attachment:trac_13072-tuples-of-tableaux-am.patch]
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13072#comment:6>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.