I've been looking at possible ways to implement the RANK command.  A problem
arises in that it's necessary to sort the data (in order to assign ranks), but
the original case order should remain unchanged.

One way would be to insert all the cases into a hash and use hsh_sort, but 
this would not scale well.

A better way would be to use sort_active_file_to_casefile (from sort.c) and 
then to use casereader_read  to iterate the cases.  This seems more attractive,
however, the problem is that since the cases have been copied, we've lost our
place in the original casefile.

I wonder if it would be possible to have a specialised class of casefile, whose 
cases contain pointers to their original source case?

Any other ideas?

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature

_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to