mcsp-algorithms-0.1.0: Algorithms for Minimum Common String Partition (MCSP) in Haskell.
Safe HaskellSafe-Inferred
LanguageGHC2021

MCSP.Heuristics.Greedy

Description

Greedy Heuristic for solving the MCSP problem.

Synopsis

Documentation

greedy :: Ord a => Pair (String a) -> Meta (Pair (Partition a)) Source #

MCSP greedy algorithm.

Tries to solve the MCSP by repeatedly finding the longest common substring (LCS), breaking the strings with it, and inserting the LCS in the resulting partition, until no common substring is left.