sandbox to improve operations of linear algebra wrapping abstract matrices
There are some Wrappert types, which provide a specialized view to an arbitrary
There are at least two important aspects that justify their existence
The existing wrappers of that kind are
|No||Wrapper class||extra method|
Items 1. - 4. have a common supertype
Items 5. - 6. and 7. - 8. share a common type, while their specialization to
:L is implemented by a data field
Items 1. - 8. have a common field
data, which contains the referred abstract matrix.
Items 9. - 11. use field
parent to refer to the abstract matrix.
The types of all items are subtypes of
AbstractMatrix. So it is possible to combine them arbitrarily. For example
Symmetric(Hermitian(UnitUpperTriangular([3+im 4+im;5 6]), :U), :U) is a valid combination of wrappers. Intuitively, it should be equal to
[3 4+im;4+im 6].
The ability to combine those wrappers liberately leads to an unlimited number of types, which makes it hard to design specialized algoritms for them, which are efficient.
This project was set up in order to improve this situation
diag(A)is not real?)
sparse(A::X)for all wrapped types X should be as efficient as
AbstractMatrix, but use corresponding methods for
AbstractSparseMatrix, after converting to
Adjoint(Transpose(A)) == conj.(A)
diag(A)is not real: throw exception?
Symmetric(Symmetric(A, :U), :L)should be
Symmetric(Hermitian(A, :U), :L)should be
view(Symmetric(A), I, J)should be
Symmetric(view(A, I, J))if
view(A, I, J)if
I,Jdon't traverse diagonal, and fall back to
All possible finite combinations of the existing wrappers form a finite set of operations. It is possible to transform all such combination to one of those 21. Nevertheless it seems not realistic to implement 21 special cases for all operations of wrapped sparse matrices. So in many cases, the fallback to one of the implemented special cases has to be organized.
Meaning: with one (wrapped) sparse argument.
|U1||issparse||determine if it is (indirectly) a wrapper of AbstractSparseMatrix|
|U3||iszero||all elements zero|
|U7||*²||multiply with dense or sparse vector|
to be continued
|B1||==||equality of 2 wrapped sparse matrices|
to be continued
about 1 year ago