Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new List Diffing algorithm for matching #49

Merged
merged 4 commits into from
May 19, 2016

Conversation

jschroed91
Copy link
Member

@jschroed91 jschroed91 commented May 18, 2016

New algorithm for list diffing.

The algorithm is based on the algorithm described in "An Algorithm for Differential File Comparison" (http://www.cs.dartmouth.edu/~doug/diff.pdf).

Basic concept is to find the LCS (longest common subsequence) for the list items in a list in order to help match list items against each other.

} elseif ($i > 0 && ($j === 0 || $c[$i][$j - 1] < $c[$i - 1][$j])) {
$this->compileMatches($c, $a, $b, $i - 1, $j, $comparator, $matches);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voodoo.

@adamCaxy
Copy link
Contributor

Only thing that needs updates are the test and annotations on the files/functions changed.

@adamCaxy
Copy link
Contributor

A really great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants