code: @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();
      }
docs: Given the current target candidate (m), find the next candidate. The next
  candidate is the next vertex > m (in some ordering) that is unmapped and
  is adjacent to a mapped vertex (terminal). If there is no such vertex
  (disconnected) the next unmapped vertex is returned. If there are no more
  candidates m == |V| of G2.
  
  @param m previous candidate m
  @return the next value of m