- SEE ALSO
- LICENSE AND COPYRIGHT
Algorithm::Bitonic::Sort - Sorting numbers with Bitonic Sort
Use Algorithm::Bitonic::Sort with the following style.
use Algorithm::Bitonic::Sort; my @sample = (1,4,8,4,4365,2,67,33,345); my @result_inc = bitonic_sort( 1 ,@sample); # incremental my @result_dec = bitonic_sort( 0 ,@sample); # decremental
Bitonic mergesort is a parallel algorithm for sorting. It is also used as a construction method for building a sorting network. This is an Perl 5 implementation of Ken Batcher's Bitonic mergesort.
This is a enhanced version of Bitonic Sort which removed the limitation of original version. This module supports any amount of numbers.
The original Bitonic can only sort N numbers, which N is a power of 2.
The First Parameter works as the ascending/decreasing selector. True (1 or any true value) means ascending (incremental), False (0 or any false value) means decreasing.
All other params will be treated as members/items to be sorted.
BlueT - Matthew Lien - 練喆明,
<BlueT at BlueT.org>
To install this module, run the following commands:
perl Makefile.PL make make test make install
Or install with cpanm
Please report any bugs or feature requests to CPAN (
bug-algorithm-bitonic-sort at rt.cpan.org, http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Algorithm-Bitonic-Sort ) or GitHub (https://github.com/BlueT/Algorithm-Bitonic-Sort/issues). I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
Batcher's web page at Kent State University
Bitonic sorter on Wikipedia
Copyright 2012-2017 BlueT - Matthew Lien - 練喆明.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.