code: private long computeLBD(final LNGIntVector lits, int e) {
      int end = e;
      long nblevels = 0;
      myflag++;
      if (incremental) {
        if (end == -1)
          end = lits.size();
        long nbDone = 0;
        for (int i = 0; i < lits.size(); i++) {
          if (nbDone >= end)
            break;
          if (isSelector(var(lits.get(i))))
            continue;
          nbDone++;
          int l = v(lits.get(i)).level();
          if (permDiff.get(l) != myflag) {
            permDiff.set(l, myflag);
            nblevels++;
          }
        }
      } else {
        for (int i = 0; i < lits.size(); i++) {
          int l = v(lits.get(i)).level();
          if (permDiff.get(l) != myflag) {
            permDiff.set(l, myflag);
            nblevels++;
          }
        }
      }
      if (!reduceOnSize)
        return nblevels;
      if (lits.size() < reduceOnSizeSize)
        return lits.size();
      return lits.size() + nblevels;
    }
docs: Computes the LBD for a given vector of literals.
  @param lits the vector of literals
  @param e    parameter for incremental mode
  @return the LBD