static Builder of(TensorType type, DimensionSizes dimensionSizes) {
            boolean containsIndexed = type.hasIndexedDimensions();
            boolean containsMapped = type.hasMappedDimensions();
            if (containsIndexed && containsMapped)
                return MixedTensor.Builder.of(type);
            if (containsMapped)
                return MappedTensor.Builder.of(type);
            else // indexed or empty
                return IndexedTensor.Builder.of(type, dimensionSizes);
        }
Creates a suitable builder for the given type
vespajlib/src/main/java/com/yahoo/tensor/Tensor.java