code: @Override
      public Datum<int[]> add(Datum<int[]> datum) {
          int[] x = datum.x;
          
          for (int xi : x) {
              if (xi < 0) {
                  throw new IllegalArgumentException("Negative index of nonzero element: " + xi);
              }
          }
          
          Arrays.sort(x);
          for (int i = 1; i < x.length; i++) {
              if (x[i] == x[i-1]) {
                  throw new IllegalArgumentException("Duplicated indices of nonzero elements: " + x[i]);
              }
          }
          
          n += x.length;
          
          int max = Math.max(x);
          if (numColumns <= max) {
              numColumns = max + 1;
              if (numColumns > colSize.length) {
                  int[] size = new int[3 * numColumns / 2];
                  System.arraycopy(colSize, 0, size, 0, colSize.length);
                  colSize = size;
              }
          }
          
          for (int xi : x) {
              colSize[xi]++;
          }
          
          return super.add(datum);
      }
docs: Add a datum item into the dataset.
  @param datum a datum item. The indices of nonzero elements will be sorted
  into ascending order.