code: public void updateCardinality(final MiniSatStyleSolver s, int rhs) {
      switch (this.cardinalityEncoding) {
        case TOTALIZER:
          this.totalizer.update(s, rhs);
          break;
        case MTOTALIZER:
          this.mtotalizer.update(s, rhs);
          break;
        default:
          throw new IllegalStateException("Unknown cardinality encoding: " + this.cardinalityEncoding);
      }
    }
docs: Updates the cardinality constraint.
  @param s   the solver
  @param rhs the new right hand side
  @throws IllegalStateException if the cardinality encoding is unknown