NAME
Algorithm::MedianSelect::XS - Median finding algorithm
SYNOPSIS
@numbers
= (21, 6, 2, 9, 5, 1, 14, 7, 12, 3, 19);
median(
@numbers
);
median(\
@numbers
);
median(\
@numbers
, {
algorithm
=>
'bubble'
});
# slow algorithm
median(\
@numbers
, {
algorithm
=>
'quick'
});
# default algorithm
DESCRIPTION
Algorithm::MedianSelect::XS
finds the item which is smaller than half of the integers and bigger than half of the integers.
FUNCTIONS
median
Takes a list or reference to an array of integers and returns the median number. Optionally, the algorithm being used for computation may be specified within a hash reference. See SYNOPSIS for algorithms currently available.
EXPORT
median()
is exportable.
SEE ALSO
http://www.cs.sunysb.edu/~algorith/files/median.shtml
AUTHOR
Steven Schubiger <schubiger@cpan.org>
LICENSE
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.