Sort::Radix - A multiple passes distribution sort algorithm
@array = qw(flow loop pool Wolf root sort tour);
This is an implementation based on Jarkko's Wolf book (Mastering Algorithms with Perl, pp. 145-147).
By definition: radix sort is a multiple pass distribution sort algorithm that distributes each item to a bucket according to part of the item's key beginning with the least significant part of the key. After each pass, items are collected from the buckets, keeping the items in order, then redistribute according to the next most significant part of the key.
Radix sort is nice as it take N * M passes, where N is the length of the keys. It is very useful for sorting large volumes of keys of the same length, such as postal codes.
The algorithm will only works when the strings to be sorted are of the same length. Variable length strings therefore have to be padded with zeroes (\x00) to equalize the length.
Unknown so far. But please kindly inform if you find one ;-)
Fixed warning caused by operator precedence and undefined error caused by misplacing the routines after __END__ marker.
Edward Wijaya, <firstname.lastname@example.org>
Jarkko Hietaniemi, <email@example.com>
Copyright (C) 2005 by Edward Wijaya
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Sort::Radix, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.