code: public static Discrete create(String name, double... xy) {
          final int mod2 = xy.length % 2;
          List<Pair> xyValues = new ArrayList<Pair>(xy.length / 2);
          for (int i = 0; i < xy.length - mod2; i += 2) {
              xyValues.add(new Pair(xy[i], xy[i + 1]));
          }
          Discrete result = new Discrete(name, xyValues);
          if (mod2 != 0) {
              result.setHeight(xy[xy.length - 1]);
          }
          return new Discrete(name, xyValues);
      }
docs: Creates a Discrete term from a variadic set of values.
  
  @param name is the name of the resulting term
  @param xy are the values `x_0, y_0, ..., x_i, y_i, ..., x_n, y_n`
  @return a new Discrete term with the given parameters