class AbstractVFState extends State {

    @Override
    final int nextN(int n) {
        if (size == 0) return 0;
        for (int i = n + 1; i < g1.length; i++)
            if (m1[i] == UNMAPPED && t1[i] > 0) return i;
        for (int i = n + 1; i < g1.length; i++)
            if (m1[i] == UNMAPPED) return i;
        return nMax();
    }

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

}