LongestCommonSubstringA Type

Problem solver for the longest common substring problem, operating in O(N) time (N being the text length), and using an array of linked structures stored in a linear array instead of linked class instances. This code runs slightly faster than LongestCommonSubstringL, and avoids creating a lot of nodes for the linked list, in order to make it easier for the garbage collector.

For details of the algorithm see the very nice paper by Michael Arnold and Enno Ohlebusch, 'Linear Time Algorithms for Generalizations of the Longest Common Substring Problem', Algorithmica (2011) 60; 806-818; DOI: 10.1007/s00453-009-9369-1. This code was adopted by D.Lellinger from the C++ sources from the web site of the authors at http://www.uni-ulm.de/in/theo/research/sequana.html.

Constructors

Constructor Description

LongestCommonSubstringA(gsa)

Full Usage: LongestCommonSubstringA(gsa)

Parameters:
    gsa : GeneralizedSuffixArray - Generalized suffix array. It is neccessary that this was constructed with individual words.

Initializes a new instance of the problem solver for the longest common substring problem.

gsa : GeneralizedSuffixArray

Generalized suffix array. It is neccessary that this was constructed with individual words.

Instance members

Instance member Description

this.Evaluate

Full Usage: this.Evaluate

Returns: LongestCommonSubstringA This instance.

Evaluates the longest common substring. After evaluation, the results can be accessed by the properties of this instance. Please be aware that the amount of resulting information depends on the state of P:StoreVerboseResults.

Returns: LongestCommonSubstringA

This instance.