GeneralizedSuffixArrayFromWordsT(IEnumerableIEnumerableT, Boolean, Boolean, IComparerT) Method |
Constructs the generalized suffix array from separate 'words'. Each list in the parameter
words is treated as 'word'. The elements are treated as characters. The elements are converted
to an integer alphabet by means of the
IntegerText class.
Namespace: Altaxo.Collections.TextAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static GeneralizedSuffixArray FromWords<T>(
IEnumerable<IEnumerable<T>> words,
bool withSeparators,
bool useSortedMapping,
IComparer<T>? customSortingComparer
)
Parameters
- words IEnumerableIEnumerableT
- The list of 'words'.
- withSeparators Boolean
- If set to true, the words were treated as individual words, and will be separated by special separator elements. If set to false, the converted text will contain the concenated 'words' without separator elements. If set to false, they will be concenated to form one single word.
- useSortedMapping Boolean
- If this parameter is true, a sorted mapping of the elements T to integers will be used. The type T then has to implement IComparable. If this parameter is false, a unsorted HashSetT will be used to make a unique mapping of the elements to integers.
- customSortingComparer IComparerT
- If useSortedMapping is true, you can here provide a custom comparer for the elements of type T. Otherwise, if you want to use the default comparer, leave this parameter null.
Type Parameters
- T
- The type of characters of the text. It must implement IComparable.
Return Value
GeneralizedSuffixArrayThe generalized suffix array. Since each list in
words is treated as separate word, the generalized suffix array is prepared to search for the longest common substring in these words.
See Also