class AbstractVFState extends State {

    @Override
    final int nextM(int n, int m) {
        if (size == 0) return m + 1;
        // if the query vertex 'n' is in the terminal set (t1) then the
        // target vertex must be in the terminal set (t2)
        for (int i = m + 1; i < g2.length; i++)
            if (m2[i] == UNMAPPED && (t1[n] == 0 || t2[i] > 0)) return i;
        return mMax();
    }

    public  AbstractVFState(final int[][] g1, final int[][] g2);

}