diff --git a/sa-builder/README.md b/sa-builder/README.md index 5f51b07..870ddb6 100644 --- a/sa-builder/README.md +++ b/sa-builder/README.md @@ -18,7 +18,7 @@ Options: -o, --output Output location where to store the suffix array -s, --sparseness-factor - The sparseness_factor used on the suffix array (default value 1, which means every value in the SA is used) [default: 1] + The sparseness_factor used on the suffix array (default value 1, which means every value in the SA is used). Internally, a library call will be performed with a maximum sparseness of 5 (because of memory usage). If a higher sparsity is desired, the largest divisor smaller than or equal to 5 is used for the library call. Then, the SA is filtered to achieve the desired sparsity. [default: 1] -a, --construction-algorithm The algorithm used to construct the suffix array (default value LibSais) [default: lib-sais] [possible values: lib-div-suf-sort, lib-sais] -c, --compress-sa diff --git a/sa-builder/src/lib.rs b/sa-builder/src/lib.rs index 50bfe06..92c4b09 100644 --- a/sa-builder/src/lib.rs +++ b/sa-builder/src/lib.rs @@ -70,7 +70,7 @@ pub fn build_ssa( } // Max sparseness for libsais because it creates a bucket for each element of the alphabet (2 ^ (sparseness * bits_per_char) buckets). -const MAX_SPARSENESS: usize = 5; +const MAX_SPARSENESS: usize = 6; fn libsais64(text: &Vec, sparseness_factor: u8) -> Result, &str> { let sparseness_factor = sparseness_factor as usize;