This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 835

Summary: Implement OnTheLeft/OnTheRight for SparseTriangularView::solve
Product: Eigen Reporter: Henrik Friberg <metronware>
Component: SparseAssignee: Nobody <eigen.nobody>
Status: CONFIRMED ---    
Severity: Feature Request CC: chtz
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 99    
Bug Blocks:    

Description Henrik Friberg 2014-06-27 04:34:14 UTC
The following does not compile:
---------------------------
Matrix3d A;
RowVector3d bT, xT;

A << 1, 2, 3,
     4, 5, 6,
     7, 8, 9;

bT << 1, 2, 3;

xT = A.triangularView<Upper>().solve<OnTheRight>(bT);  // WORKS FINE!
printf("(%g, %g, %g)", xT(0), xT(1), xT(2));

SparseMatrix<double> spA = A.sparseView();
spA.triangularView<Upper>().solve<OnTheRight>(bT);  // COMPILE ERROR!
---------------------------

SparseTriangularView::solve accepts neither <OnTheLeft> nor <OnTheRight> as template argument, but neglecting the argument compiles fine..
Comment 1 Christoph Hertzberg 2014-06-27 10:42:21 UTC
Most likely this will not be implemented without bug 99. With bug 99, we might directly make things like
  xt = bT * spA.triangularView<Upper>().inverse();
do "the right thing". You can workaround using:
  xT=spA.transpose().triangularView<Lower>().solve(bT.transpose()).transpose();
or, if possible, model your matrices and vectors the other way around.
Comment 2 Nobody 2019-12-04 13:28:09 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/835.