@Override
    public String toString(ToStringContext<NAMETYPE> context) {
        return "diag(" + dimensionNames().collect(Collectors.joining(",")) + ")" + diagFunction;
    }
A tensor generator which returns a tensor of any dimension filled with 1 in the diagonal and 0 elsewhere.

@author bratseth
vespajlib/src/main/java/com/yahoo/tensor/functions/Diag.java