Algorithm::Bitonic::Sort - Sorting numbers with Bitonic Sort
Version 0.06
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.
bitonic_sort
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>
<BlueT at BlueT.org>
To install this module, run the following commands:
perl Makefile.PL make make test make install
Or install with cpanm
cpanm Algorithm::Bitonic::Sort
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.
bug-algorithm-bitonic-sort at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Algorithm::Bitonic::Sort
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Algorithm-Bitonic-Sort
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Algorithm-Bitonic-Sort
CPAN Ratings
http://cpanratings.perl.org/d/Algorithm-Bitonic-Sort
Search CPAN
http://search.cpan.org/dist/Algorithm-Bitonic-Sort/
Launchpad
https://launchpad.net/p5-algorithm-bitonic-sort
GitHub
https://github.com/BlueT/Algorithm-Bitonic-Sort
Batcher's web page at Kent State University
http://www.cs.kent.edu/~batcher/
Bitonic sorter on Wikipedia
http://en.wikipedia.org/wiki/Bitonic_sorter
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.
To install Algorithm::Bitonic::Sort, copy and paste the appropriate command in to your terminal.
cpanm
CPAN shell
perl -MCPAN -e shell install Algorithm::Bitonic::Sort
For more information on module installation, please visit the detailed CPAN module installation guide.