Click or drag to resize

GeneralizedSuffixArrayFromWords(IEnumerableString, Boolean, Boolean, IComparerChar) 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.Text
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static GeneralizedSuffixArray FromWords(
	IEnumerable<string> words,
	bool withSeparators,
	bool useSortedMapping,
	IComparer<char>? customSortingComparer
)

Parameters

words  IEnumerableString
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  IComparerChar
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.

Return Value

GeneralizedSuffixArray
The 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