docs: @Override
    public void put(double[] val) {
      assert (val.length == elements.length);
      wsum += 1.0;
      for(int i = BitsUtil.nextSetBit(dims, 0); i >= 0; i = BitsUtil.nextSetBit(dims, i + 1)) {
        final double delta = val[i] - elements[i];
        elements[i] += delta / wsum;
      }
    }