Algorithm-Bitonic-Sort
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
1234567891011use
utf8;
use
5.006;
use
strict;
use
warnings;
use
ExtUtils::MakeMaker;
WriteMakefile(
NAME
=>
'Algorithm::Bitonic::Sort'
,
AUTHOR
=>
q{BlueT - Matthew Lien - 練喆明 <BlueT@BlueT.org>}
,
VERSION_FROM
=>
'lib/Algorithm/Bitonic/Sort.pm'
,
ABSTRACT_FROM
=>
'lib/Algorithm/Bitonic/Sort.pm'
,
lib/Algorithm/Bitonic/Sort.pm view on Meta::CPAN
12345678910111213141516171819202122232425262728293031package
Algorithm::Bitonic::Sort;
use
utf8;
use
common::sense;
if
(DEBUG) {
}
our
(
@ISA
,
@EXPORT
);
BEGIN {
@ISA
=
qw(Exporter)
;
@EXPORT
=
qw(bitonic_sort)
;
# symbols to export on request
}
# "A supercomputer is a device for turning compute-bound problems into I/O-bound problems."
=encoding utf8
=head1 NAME
Algorithm::Bitonic::Sort - Sorting numbers with Bitonic Sort
=head1 VERSION
Version 0.06
=cut
t/01-sort.t view on Meta::CPAN
1234567891011121314#!perl
use
5.10.1;
use
utf8;
use
common::sense;
my
@sample
= (1,5,8,4,4365,2,67,33,345);
my
@up
= (1,2,4,5,8,33,67,345,4365);
my
@down
= (4365,345,67,33,8,5,4,2,1);
my
@result
= bitonic_sort( 1 ,
@sample
);
( run in 1.040 second using v1.01-cache-2.11-cpan-49f99fa48dc )