void extend()
    {
        int newX = x;
        while ( newX<parent.B.length && newX-index<parent.A.length
            && parent.B[newX] == parent.A[newX-index] )
            newX++;
        if ( newX > x )
        {
            parent.track( x, x-index, newX, newX-index );
            setPrev( this.p, PathOperation.matched, x, index, newX-x );
            x = newX;
            parent.setBest( this );
        }
    }