Open KlausC opened 5 years ago
Would you just ignore the uplo
argument?
Ref https://github.com/JuliaLang/julia/issues/21616#issuecomment-298059168, #21622 and #22264
Yes, I would ignore the uplo argument.
The argument of "correct aliasing" given in #21616 (comment) is just another word for sticking to the uplo
value of the outer constructor.
IMHO that is a much less valuable property than the given rules 1. and 2.
Rule 1 is well-definedness of the functions Symmetrix(., uplo)
(if x == y => f(x) == f(y))
Rule 2 is the meaning of the default value
@fredrikekre I read Ref #21616 (comment) carefully, but I still don't understand, why
Symmetric(A, :U).uplo == 'U'
is more important than
Symmetric(A) == Symmetric(Matrix(A))
for all abstract matrices A
. The second one is a general principle, while the first one looks more like a random technical restriction.
Look also at this text, which tries to present a fresh view to the meaning of wrappers: universal matrix wrappers.
I think it is common understanding, that for
X::AbstractMatrix
.Symmetric(X, uplo) == Symmetric(Matrix(X), uplo)
Symmetric(X) == Symmetric(X, :U)
Actually we observe
I think, we should have
Symmetric(X::Symmetric, uplo::Symbol=:U) = X
independent ofuplo
andX.uplo
.The same is true for
Hermitian