code: public static String formatXY(List<Discrete.Pair> xy,
              String prefix, String innerSeparator,
              String suffix, String outerSeparator) {
          StringBuilder result = new StringBuilder();
          Iterator<Pair> it = xy.iterator();
          while (it.hasNext()) {
              Pair pair = it.next();
              result.append(prefix).append(Op.str(pair.getX()))
                      .append(innerSeparator).append(Op.str(pair.getY()))
                      .append(suffix);
              if (it.hasNext()) {
                  result.append(outerSeparator);
              }
          }
          return result.toString();
      }
docs: Formats a vector of Pair into a string in the form
  
  `(x_1,y_1) ... (x_n,y_n)`
  @param xy is the vector of Pair
  @param prefix indicates the prefix of a Pair, e.g., `(` results in
  `(x_i`
  @param innerSeparator indicates the separator between
  `x` and `y`, e.g., `,` results in `x_i,y_i`
  @param suffix indicates the postfix of a Pair, e.g., `]` results in
  `y_i]`
  @param outerSeparator indicates the separator between Pair, e.g., `;`
  results in `(x_i,y_i);(x_j,y_j)`
  @return a formatted string containing the pairs of `(x,y)` values