void compute()
    {
        diagonals = new Diagonal( 0, this, 0 );
        diagonals.p = new Path( 0, 0, PathOperation.nothing, 0 );
        Diagonal current = diagonals;
        best = diagonals;
        d = 1;
        int run = 0;
        int N = (A.length>B.length)?A.length:B.length;
        while ( d < N )
        {
            while ( current != null && !current.atEnd() )
            {
                if ( (run % 2) == Math.abs(current.index % 2) )
                    current.seek();
                current = current.left;
            }
            if ( current != null && current.atEnd() )
                break;
            if ( run % 2 == 1 )
                d++;
            run++;
            current = diagonals;
        }
    }