Dear all,

in the category for `EnumeratedSets` we have methods `rank` and `unrank` 
that provide a bijection between the set and the natural numbers (or some 
interval [0,n], if the cardinality is n).  These methods are mostly used in 
the category framework, I think, to provide generic implementations of 
`random_element` and the like.

Unfortunately, this conflicts with the method `rank` in Posets and 
WeylGroups, as I realized while adding a test_rank method (which in turn 
uncovered quite a few bugs).

Even though `rank` and `unrank` were introduced very early in the game, I 
think it would make sense to rename them to something less confusing and 
deprecate them.  I don't think they are used much by users.   For example, 
I think `total_order_rank` and `total_order_unrank` would be OK.

I don't think it is wise to rename `Poset.rank` or `WeylGroup.rank`, 
because these are really extremely standard.  We do have 
`StandardTableau.standard_descents` 
and `StandardTableau.standard_major_index`, because of an historical 
accident, and I think it's a pain.  However, if very many people think it 
is better to do `Poset.standard_rank`, than this would also be an option.

I am also open to other suggestions, but I really think that these methods 
should be tested systematically.

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/203c8024-4d5b-46ea-8609-5de51eea2a22n%40googlegroups.com.

Reply via email to