naoya / perl-algorithm-divsufsort
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
Changes | ||
| |
DivSufSort.xs | ||
| |
MANIFEST | ||
| |
Makefile.PL | ||
| |
README | ||
| |
examples/ | ||
| |
lib/ | ||
| |
ppport.h | ||
| |
t/ |
README
NAME
Algorithm::DivSufSort - Perl interface to libdivsufsort
SYNOPSIS
use Algorithm::DivSufSort qw/divsufsort/;
my $suffix_array = divsufsort("abracadabra");
for (my $i = 0; $i < @$sa; $i++) {
say sprintf (
"sa[%2d] = %2d, substr(text, %2d) = %s",
$i,
$sa->[$i],
$sa->[$i],
substr($text, $sa->[$i]),
);
}
## Results
sa[ 0] = 10, substr(text, 10) = a
sa[ 1] = 7, substr(text, 7) = abra
sa[ 2] = 0, substr(text, 0) = abracadabra
sa[ 3] = 3, substr(text, 3) = acadabra
sa[ 4] = 5, substr(text, 5) = adabra
sa[ 5] = 8, substr(text, 8) = bra
sa[ 6] = 1, substr(text, 1) = bracadabra
sa[ 7] = 4, substr(text, 4) = cadabra
sa[ 8] = 6, substr(text, 6) = dabra
sa[ 9] = 9, substr(text, 9) = ra
sa[10] = 2, substr(text, 2) = racadabra
DESCRIPTION
The libdivsufsort project provides a fast, lightweight, and robust C API
library to construct the suffix array.
This module provides interface to divsufsort() API.
SEE ALSO
<http://code.google.com/p/libdivsufsort/>
TODO
Supports other APIs - divbwt(), bw_transform(), inverse_bw_transform(),
sufcheck(), sa_search(), sa_simplesearch()
ACKNOWLEDGEMENTS
The libdivsufsort library is developed by Yuta Mori.
AUTHOR
Naoya Ito, <naoya at bloghackers.net>
COPYRIGHT AND LICENSE
Copyright (C) 2008 by Naoya Ito
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself, either Perl version 5.8.8 or, at
your option, any later version of Perl 5 you may have available.

