Class State

java.lang.Object
  extended by State

public class State
extends java.lang.Object

Instances of class State hold the four (short) integers x,y,dx,dy representing a state of the automaton described in Section 3.2.


Field Summary
(package private)  short dx
          The encoding of the last h differences in the last column of the limited-history lcs table.
(package private)  short dy
          The encoding of the last h differences in the last row of the limited-history lcs table.
(package private) static int h
          The history length.
static boolean REDUCE
          Control whether the reduction based on the symmetry between <x,y,dx,dy> and <complement(x),complement(y),dx,dy> is used.
(package private) static boolean verbose
          Control whether verbose output is produced.
(package private)  short x
          The encoding of the last h bits of the upper input string.
(package private)  short y
          The encoding of the last h bits of the lower input string.
 
Constructor Summary
State()
          Create a new uninitialized state.
State(int x, int y, int dx, int dy)
          Create a new state and initialize its components from the parameters.
 
Method Summary
 boolean equals(State t)
          Test whether all four components of this state are equal to the corresponding components of state t.
 int hashValue()
          Return a hash value for this state.
static void main(java.lang.String[] args)
          Set the verbose flags to true and then perform several tests.
 void reduce()
          Reduce this state to a canonical form for the equivalence between <x,y,dx,dy> and <complement(x),complement(y),dx,dy>
 java.lang.String toString()
          Produce a string representing this state (in hexadecimal).
 State transition(int character, int padding)
          Return the new state resulting from this state upon reading a minimal match pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REDUCE

public static final boolean REDUCE
Control whether the reduction based on the symmetry between <x,y,dx,dy> and <complement(x),complement(y),dx,dy> is used.

See Also:
Constant Field Values

verbose

static boolean verbose
Control whether verbose output is produced.


h

static int h
The history length.


x

short x
The encoding of the last h bits of the upper input string.


y

short y
The encoding of the last h bits of the lower input string.


dx

short dx
The encoding of the last h differences in the last column of the limited-history lcs table.


dy

short dy
The encoding of the last h differences in the last row of the limited-history lcs table.

Constructor Detail

State

public State()
Create a new uninitialized state.


State

public State(int x,
             int y,
             int dx,
             int dy)
Create a new state and initialize its components from the parameters.

Method Detail

equals

public boolean equals(State t)
Test whether all four components of this state are equal to the corresponding components of state t.


toString

public java.lang.String toString()
Produce a string representing this state (in hexadecimal).

Overrides:
toString in class java.lang.Object

transition

public State transition(int character,
                        int padding)
Return the new state resulting from this state upon reading a minimal match pair. The method q.transition(character,padding) computes delta(q,Tcharacter,padding) where delta is the procedure shown in Figure 7, and Tcharacter,padding is as defined in the overview of the code.


reduce

public void reduce()
Reduce this state to a canonical form for the equivalence between <x,y,dx,dy> and <complement(x),complement(y),dx,dy>


hashValue

public int hashValue()
Return a hash value for this state.


main

public static void main(java.lang.String[] args)
Set the verbose flags to true and then perform several tests. (This also tests some of the methods in DPTable.) In particular, compute the two transitions shown in Figures 5 and 6 of the paper.