Paul Winkler wrote:
> On Tue, Mar 27, 2007 at 03:25:00PM -0400, Jim Washington wrote:
>> A factoradic index is representable as a long integer.  Given that
>> integer and the canonical list, you can regenerate the permutation
>> represented by that integer.  So, instead of caching the sorted list
>> itself, you find and keep this integer, which is all the information
>> needed to algorithmically re-obtain the sorted list.
>> So, this would be slower than caching, but (I think) faster than re-sorting.
> Doesn't it mean you need the entire canonical list in memory?
Yes, I think so, at least in the implementation/algorithm I am using. 
There may be other implementations that do not need this.  Note,
however, that the canonical list does not have to be complex objects. 
The canonical list is just a representation of the "unsorted" state.  It
can, for example, be a proxy list of iids, list indexes, or OOBTree
keys.  The algorithm does not care what it is reordering.

-Jim Washington

Zope3-dev mailing list

Reply via email to