@Override
        public MixedTensor build() {
            TensorType boundType = createBoundType();
            BoundBuilder builder = new BoundBuilder(boundType, cells.size());
            for (Map.Entry<TensorAddress, Double> cell : cells.entrySet()) {
                builder.cell(cell.getKey(), cell.getValue());
            }
            return builder.build();
        }
Temporarily stores all cells to find bounds of indexed dimensions,
then creates a tensor using BoundBuilder. This is due to the
fact that for serialization the size of the dense subspace must be
known, and equal for all dense subspaces. A side effect is that the
tensor type is effectively changed, such that unbound indexed
dimensions become bound.
vespajlib/src/main/java/com/yahoo/tensor/MixedTensor.java