-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
int ksa_bwt(unsigned char *T, int n, int k); | ||
|
||
/** | ||
* Recursively construct the suffix array for a string containing multiple | ||
* sentinels. NULL is taken as the sentinel. | ||
* | ||
* @param T NULL terminated input string (there can be multiple NULLs) | ||
* @param SA output suffix array | ||
* @param fs working space available in SA (typically 0 when first called) | ||
* @param n length of T, including the trailing NULL | ||
* @param k size of the alphabet (typically 256 when first called) | ||
* @param cs # bytes per element in T; 1 or sizeof(saint_t) (typically 1 when first called) | ||
* | ||
* @return 0 upon success | ||
*/ | ||
int ksa_core(unsigned char const *T, int *SA, int fs, int n, int k, int cs); | ||
|
||
/** | ||
* Construct the suffix array for a NULL terminated string possibly containing | ||
* multiple sentinels (NULLs). | ||
* | ||
* @param T[0..n-1] NULL terminated input string | ||
* @param SA[0..n-1] output suffix array | ||
* @param n length of the given string, including NULL | ||
* @param k size of the alphabet including the sentinel; no more than 256 | ||
* @return 0 upon success | ||
*/ | ||
int ksa_sa(unsigned char const *T, int *SA, int n, int k); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
int ksa_bwt64(unsigned char *T, long int n, int k); | ||
|
||
/** | ||
* Recursively construct the suffix array for a string containing multiple | ||
* sentinels. NULL is taken as the sentinel. | ||
* | ||
* @param T NULL terminated input string (there can be multiple NULLs) | ||
* @param SA output suffix array | ||
* @param fs working space available in SA (typically 0 when first called) | ||
* @param n length of T, including the trailing NULL | ||
* @param k size of the alphabet (typically 256 when first called) | ||
* @param cs # bytes per element in T; 1 or sizeof(saint_t) (typically 1 when first called) | ||
* | ||
* @return 0 upon success | ||
*/ | ||
int ksa_core64(unsigned char const *T, long int *SA, long int fs, long int n, long int k, int cs); | ||
|
||
/** | ||
* Construct the suffix array for a NULL terminated string possibly containing | ||
* multiple sentinels (NULLs). | ||
* | ||
* @param T[0..n-1] NULL terminated input string | ||
* @param SA[0..n-1] output suffix array | ||
* @param n length of the given string, including NULL | ||
* @param k size of the alphabet including the sentinel; no more than 256 | ||
* @return 0 upon success | ||
*/ | ||
int ksa_sa64(unsigned char const *T, long int *SA, long int n, int k); |