docs: public int[] assignmentToIntArray(Assignment assignment) {
      int[] value = new int[nums.length];
      for (int i = 0; i < nums.length; i++) {
        Preconditions.checkState(vars[i] instanceof DiscreteVariable);
        Preconditions.checkArgument(assignment.contains(nums[i]),
            "Partial assignment provided to assignmentToIntArray. Assignment: %s, variables: %s", assignment, this);
        value[i] = ((DiscreteVariable) vars[i]).getValueIndex(assignment.getValue(nums[i]));
      }
      return value;
    }