docs: @Override
    public SparseTensor build() {
      long[] tableKeyNums = new long[outcomes.size()];
      double[] tableValues = new double[outcomes.size()];
      int index = 0;
      for (Map.Entry<Long, Double> entry : outcomes.entrySet()) {
        if (entry.getValue() != 0.0) {
          tableKeyNums[index] = entry.getKey();
          tableValues[index] = entry.getValue();
          index++;
        }
      } 
      return new SparseTensor(getDimensionNumbers(), getDimensionSizes(),
          tableKeyNums, tableValues);
    }