Part of bzrlib
Function | unique_lcs_py | Find the longest common subset for unique lines. |
Function | recurse_matches_py | Find all of the matching text in the lines of a and b. |
Function | _collapse_sequences | Find sequences of lines. |
Function | _check_consistency | Undocumented |
This only matches lines which are unique on both sides. This helps prevent common lines from over influencing match results. The longest common subset uses the Patience Sorting algorithm: http://en.wikipedia.org/wiki/Patience_sorting
Parameters | a | An indexable object (such as string or list of strings) |
b | Another indexable object (such as string or list of strings) | |
Returns | A list of tuples, one for each line which is matched. [(line_in_a, line_in_b), ...] |
Parameters | a | A sequence |
b | Another sequence | |
alo | The start location of a to check, typically 0 | |
ahi | The start location of b to check, typically 0 | |
ahi | The maximum length of a to check, typically len(a) | |
bhi | The maximum length of b to check, typically len(b) | |
answer | The return array. Will be filled with tuples indicating [(line_in_a, line_in_b)] | |
maxrecursion | The maximum depth to recurse. Must be a positive integer. | |
Returns | None, the return value is in the parameter answer, which should be a list |