Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Algorithm::SISort 0.14

    Download button

    No screenshots available
    Downloads: 383  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Hrafnkell F. Hlodversson | More programs
    Perl Artistic License / FREE
    May 17th, 2007, 12:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Algorithm::SISort description

    Algorithm::SISort is a Perl module that contains select and insert sorting algorithm.

    Algorithm::SISort is a Perl module that contains select and insert sorting algorithm.

    SYNOPSIS

    use Algorithm::SISort qw(Sort Sort_inplace);

    @sorted_list = Sort {$_[0] $_[1]} @unsorted_list;
    # ... or ...
    $number_of_comparisons = Sort_inplace {$_[0] $_[1]} @unsorted_list;

    This module implements a sorting algorithm I saw in BIT 28 (1988) by Istvn Beck and Stein Krogdahl. This implementation is mainly intended to try out the Inline module by Brian Ingerson. The algorithm is a combination of Straight Insertion Sort and Selection Sort. While Insertion Sort and Selection Sort both are of complexity O(n**2), Select and Insert Sort should have complexity O(n**1.5).

    This module defines the functions Sort and Sort_inplace, which have signatures similar to the internal sort function. The difference is that a codref defining a comparison is always required and that the two values to compare are always passed in @_ and not as $a and $b. (Although I might change that later.)
    Sort returns a sorted copy if the array, but Sort_inplace sorts the array in place (as the name suggests) and returns the number of comparisons done. (Note that the sorting is always done in place, Sort just copies the array before calling the internal sort routine.)

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    select sorting algorithm | insert sorting algorithm | Perl module | Algorithm::SISort | sorting | algorithm

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM