Skip to content

Commit

Permalink
allow sparseness 6 for libsais
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonVandeVyver committed Oct 25, 2024
1 parent d2feb52 commit b91a759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sa-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Options:
-o, --output <OUTPUT>
Output location where to store the suffix array
-s, --sparseness-factor <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 <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
Expand Down
2 changes: 1 addition & 1 deletion sa-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8>, sparseness_factor: u8) -> Result<Vec<i64>, &str> {
let sparseness_factor = sparseness_factor as usize;

Expand Down

0 comments on commit b91a759

Please sign in to comment.