code: public void setVariableOrder(final Variable... varOrder) {
      this.kernel.setNumberOfVars(varOrder.length);
      for (final Variable lit : varOrder) {
        final int idx = this.var2idx.size();
        this.var2idx.put(lit.variable(), idx);
        this.idx2var.put(idx, lit.variable());
      }
    }
docs: Sets the variable order for this factory manually.  In this case the number of variables has not to be set manually.
  @param varOrder the variable order.