CommonSubstring Type

Stores the positions of a common substring in a list of words. This corresponds to a certain interval [begin, end] of the suffix array.

Constructors

Constructor Description

CommonSubstring(subStringLength, beg, end, suffixArray, wordIndices, wordStartPositions)

Full Usage: CommonSubstring(subStringLength, beg, end, suffixArray, wordIndices, wordStartPositions)

Parameters:
    subStringLength : int - Length of the substring.
    beg : int - Start of the range in the suffix array.
    end : int - End of the range in the suffix array.
    suffixArray : int[] - The suffix array.
    wordIndices : int[] - Array of word indices corresponding to the entries of the suffix array.
    wordStartPositions : int[] - The word start positions in the concentated array of all words (with or without separators).

Initializes a new instance of the CommonSubstring struct.

subStringLength : int

Length of the substring.

beg : int

Start of the range in the suffix array.

end : int

End of the range in the suffix array.

suffixArray : int[]

The suffix array.

wordIndices : int[]

Array of word indices corresponding to the entries of the suffix array.

wordStartPositions : int[]

The word start positions in the concentated array of all words (with or without separators).

Instance members

Instance member Description

this.FirstPosition

Full Usage: this.FirstPosition

Returns: SubstringPosition

Gets the first position of the common substring.

Returns: SubstringPosition

this.GetCommonSubstring

Full Usage: this.GetCommonSubstring

Parameters:
    words : IList<string> - The words that were originally used to build the common substring query (only when the words were strings, otherwise please use the generic version of this function).

Returns: string The common substring that is represented by this instance.

Gets the common substring.

words : IList<string>

The words that were originally used to build the common substring query (only when the words were strings, otherwise please use the generic version of this function).

Returns: string

The common substring that is represented by this instance.

this.GetCommonSubstring

Full Usage: this.GetCommonSubstring

Parameters:
    words : IList<IList<'T>> - The words that were originally used to build the common substring query. If the original words were strings, please use this Text.GetCommonSubstring.

Returns: List<'T> The common substring that is represented by this instance.

Gets the common substring.

words : IList<IList<'T>>

The words that were originally used to build the common substring query. If the original words were strings, please use this Text.GetCommonSubstring.

Returns: List<'T>

The common substring that is represented by this instance.

this.Positions

Full Usage: this.Positions

Returns: IEnumerable<SubstringPosition>

Enumerates through all positions of the common substring.

Returns: IEnumerable<SubstringPosition>

this.ToString

Full Usage: this.ToString

Returns: string A String that represents this instance.
Modifiers: abstract

Returns a String that represents this instance.

Returns: string

A String that represents this instance.