1 unstable release
new 0.1.0 | Jan 3, 2025 |
---|
#738 in Algorithms
108 downloads per month
22KB
390 lines
sa-is
Suffix Array Induced Sorting (SA-IS) algorithm based on the paper "Linear Suffix Array Construction by Almost Pure Induced-Sorting" by G. Nong, S. Zhang and W. H. Chan and the C++ implementation in Chromium.
Usage
use sa_is::make_suffix_array;
let answer = make_suffix_array(b"banana", char::MAX as usize);
assert_eq!(answer, [5, 3, 1, 0, 4, 2]);
License
This project is licensed under both the BSD-3-Clause and MIT licenses:
- The original code from the Chromium project is licensed under the BSD-3-Clause license.
- Any new contributions made to this project are licensed under the MIT license.
See the LICENSE file for details.
Dependencies
~1MB
~25K SLoC