Algorithm-SkipList
view release on metacpan or search on metacpan
lib/Algorithm/SkipList.pm view on Meta::CPAN
return ($left <=> $right);
}
sub validate_key {
my $self = shift;
my $key = shift;
return ($key =~ s/\-?\d+(\.\d+)?$/); # test if key is numeric
}
To use this, we say simply
$number_list = new Algorithm::SkipList( node_class => 'NumericNode' );
This skip list should work normally, except that the keys must be
numbers.
For another example of customized nodes, see L<Tie::RangeHash> version
1.00_b1 or later.
=head2 About Search Fingers
( run in 0.350 second using v1.01-cache-2.11-cpan-483215c6ad5 )