|Summary:||Wrong 1x1 triangular matrix-vector product|
|Product:||Eigen||Reporter:||Chen-Pang He <jdh8>|
|Component:||Core - matrix products||Assignee:||Nobody <eigen.nobody>|
|Severity:||Wrong Result||CC:||chtz, gael.guennebaud|
|Bug Depends on:|
Description Chen-Pang He 2014-07-07 14:28:02 UTC
Created attachment 473 [details] Demo reproducing the bug Our internal::triangular_matrix_vector_product is specialized for triangular matrix-vector product. When 1x1 times 1xn, it ends prematurely by computing only one entry. The below is the output from the program compiled with the attachment. Matrix: 0.144509 0.0973679 -0.228021 0.190039 -0.105256 -0.131808 0.0489002 0.160188 Triangular: 0.144509 0 0 0 0 0 0 0 ?TRMV: 0.144509 0 0 0 0 0 0 0 ?TRMM: 0.144509 0.0973679 -0.228021 0.190039 -0.105256 -0.131808 0.0489002 0.160188
Comment 1 Chen-Pang He 2014-07-08 08:13:34 UTC
I see where the problem is. When TriangularProduct invokes internal::trmv_selector, side information is lost. We assumed that if the non-triangular is column-vector then the triangular is on the left. However, it is possible that the triangular is row-vector on the right. I am working on a patch to internal::trmv_selector.
Comment 2 Chen-Pang He 2014-07-08 21:38:55 UTC
I found that no refactorization is needed. I have made a pull request. https://bitbucket.org/eigen/eigen/pull-request/72/fix-bug-839
Comment 3 Gael Guennebaud 2014-07-09 13:45:22 UTC
Comment 4 Nobody 2019-12-04 13:29:57 UTC
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/839.