메소드 | 설명 | |
---|---|---|
DiffInt ( int ArrayA, int ArrayB ) : System.Item[] |
Find the difference in 2 arrays of integers.
|
|
DiffText ( string TextA, string TextB ) : System.Item[] |
Find the difference in 2 texts, comparing by textlines.
|
|
DiffText ( string TextA, string TextB, bool trimSpace, bool ignoreSpace, bool ignoreCase ) : System.Item[] |
Find the difference in 2 text documents, comparing by textlines. The algorithm itself is comparing 2 arrays of numbers so when comparing 2 text documents each line is converted into a (hash) number. This hash-value is computed by storing all textlines into a common hashtable so i can find dublicates in there, and generating a new number each time a new textline is inserted.
|
|
Main ( string args ) : int |
start a self- / box-test for some diff cases and report to the debug output.
|
|
TestHelper ( System.Item f ) : string |
메소드 | 설명 | |
---|---|---|
CreateDiffs ( |
Scan the tables of which lines are inserted and deleted, producing an edit script in forward order.
|
|
DiffCodes ( string aText, |
This function converts all textlines of the text into unique numbers for every unique textline so further work can work only with simple numbers.
|
|
LCS ( |
This is the divide-and-conquer implementation of the longes common-subsequence (LCS) algorithm. The published algorithm passes recursively parts of the A and B sequences. To avoid copying these arrays the lower and upper bounds are passed while the sequences stay constant.
|
|
Optimize ( |
If a sequence of modified lines starts with a line that contains the same content as the line that appends the changes, the difference sequence is modified so that the appended line and not the starting line is marked as modified. This leads to more readable diff sequences when comparing text files.
|
|
SMS ( |
This is the algorithm to find the Shortest Middle Snake (SMS).
|
public static DiffInt ( int ArrayA, int ArrayB ) : System.Item[] | ||
ArrayA | int | A-version of the numbers (usualy the old one) |
ArrayB | int | B-version of the numbers (usualy the new one) |
리턴 | System.Item[] |
public DiffText ( string TextA, string TextB ) : System.Item[] | ||
TextA | string | A-version of the text (usualy the old one) |
TextB | string | B-version of the text (usualy the new one) |
리턴 | System.Item[] |
public static DiffText ( string TextA, string TextB, bool trimSpace, bool ignoreSpace, bool ignoreCase ) : System.Item[] | ||
TextA | string | A-version of the text (usualy the old one) |
TextB | string | B-version of the text (usualy the new one) |
trimSpace | bool | When set to true, all leading and trailing whitespace characters are stripped out before the comparation is done. |
ignoreSpace | bool | When set to true, all whitespace characters are converted to a single space character before the comparation is done. |
ignoreCase | bool | When set to true, all characters are converted to their lowercase equivivalence before the comparation is done. |
리턴 | System.Item[] |