Algorithm::SkipList

Algorithm::SkipList is a Perl implementation of skip lists.
Download

Algorithm::SkipList Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Robert Rothenberg
  • Publisher web site:
  • http://search.cpan.org/~rrwo/

Algorithm::SkipList Tags


Algorithm::SkipList Description

Algorithm::SkipList is a Perl implementation of skip lists. Algorithm::SkipList is a Perl implementation of skip lists.SYNOPSIS my $list = new Algorithm::SkipList(); $list->insert( 'key1', 'value' ); $list->insert( 'key2', 'another value' ); $value = $list->find('key2'); $list->delete('key1');This is an implementation of skip lists in Perl.Skip lists are similar to linked lists, except that they have random links at various levels that allow searches to skip over sections of the list, like so: 4 +---------------------------> +----------------------> + | | | 3 +------------> +------------> +-------> +-------> +--> + | | | | | | 2 +-------> +--> +-------> +--> +--> +--> +-------> +--> + | | | | | | | | | 1 +--> +--> +--> +--> +--> +--> +--> +--> +--> +--> +--> + A B C D E F G H I J NILA search would start at the top level: if the link to the right exceeds the target key, then it descends a level.Skip lists generally perform as well as balanced trees for searching but do not have the overhead with respect to inserting new items. See the included file Benchmark.txt for a comparison of performance with other Perl modules.Requirements:· Perl· enum Requirements: · Perl · enum


Algorithm::SkipList Related Software