Function libsais

Source
pub unsafe extern "C" fn libsais(
    T: *const u8,
    SA: *mut i32,
    n: i32,
    fs: i32,
    freq: *mut i32,
) -> i32
Expand description

Constructs the suffix array of a given string.

§Arguments

  • T - [0..n-1] The input string.
  • SA - [0..n-1+fs] The output array of suffixes.
  • n - The length of the given string.
  • fs - The extra space available at the end of SA array (0 should be enough for most cases).
  • freq - [0..255] The output symbol frequency table (can be NULL).

§Returns

0 if no error occurred, -1 or -2 otherwise.