At present we have the
Symmetric type in
LinearAlgebra which wraps an
AbstractMatrix. This seems like a sensible strategy when dealing with dense
Matrixs, and things like that. However, (to pick a single example) wrapping a
Diagonal matrix in a
Symmetric seems somewhat redundant and, at present, we don’t have functionality that says “give me a symmetric version of a matrix
x, and do it in whatever way the author of the type of
x deems best”.
Is there a particular reason that we don’t have a function like this, that mirrors e.g.
PermutedDimsArray? There appears to be a
symmetric function in
LinearAlgebra, but it’s not exported, so presumably it’s not intended for use in general.
n.b. I’ve assumed here that if one writes
Type(args...) that you should always expect to in fact receive an output of type
Type, so it would be incorrect for
Symmetric(x) to return anything that isn’t a
edit: I’ve also assumed that array authors are free to implement
permutedims in whatever way they deem most suitable for their and, in particular, that they needn’t return a
PermutedDimsArray if they choose not to. If this assumption is incorrect, I would appreciate being told about it!