Class StringCompare
java.lang.Object
|
+--StringCompare
- public class StringCompare
- extends java.lang.Object
- implements UserOptions
this class implements the algorithm for comparing the number of words from a string
recognized into another string
- See Also:
UserOptions
Field Summary |
(package private) java.lang.String[] |
input
|
(package private) StringCompare.Element[][] |
matrix
|
(package private) int |
max_class
|
(package private) int |
pos_max
indicates the position of the word with the maximum class in the output string |
(package private) int[][] |
pos_rec
records the positions where the common substring is retrieved
it has 2 rows and an arbitrary number of columns up to 50 (which is the maximum length of the input string)
pos[0] records the positions in the input string
pos[1] records the positions in the output string |
(package private) java.lang.String[] |
rec
|
Constructor Summary |
StringCompare(java.lang.String[] s1,
java.lang.String[] s2)
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
input
java.lang.String[] input
rec
java.lang.String[] rec
matrix
StringCompare.Element[][] matrix
max_class
int max_class
pos_max
int pos_max
- indicates the position of the word with the maximum class in the output string
pos_rec
int[][] pos_rec
- records the positions where the common substring is retrieved
it has 2 rows and an arbitrary number of columns up to 50 (which is the maximum length of the input string)
pos[0] records the positions in the input string
pos[1] records the positions in the output string
StringCompare
public StringCompare(java.lang.String[] s1,
java.lang.String[] s2)
assignClasses
public void assignClasses()
searchFirstElem
private int searchFirstElem(int x,
int y)
maximum
private int maximum(int x,
int y)
result
public void result()