Registered Member
|
Hello, I am no sure about these two issues:
1) I have a symmetric sparse matrix (double) M in which I store only the upper part and a non symmetric sparse matrix (double) T ; Is T.transpose()*M.selfadjointView<Upper>()*T correct ? 2) In the case of complex matrix, to use selfadjointView<Symmetrix > in place of selfadjointView<Upper> is equivalent to force: mij = mji = a+ib ? Thx |
Moderator
|
1) T.transpose()*M.selfadjointView<Upper>()*T probably does not work yet. You have to evaluate M.selfadjointView<Upper>() into a full SparseMatrix:
SparseMatrix<double> tmp; tmp = M.selfadjointView<Upper>(); T.transpose()*tmp*T 2) selfadjointView<...> only accepts Upper or Lower. In the future, symmetricView<Upper or Lower> will provide what you're looking for. |
Registered Member
|
tnx |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell