This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 835 - Implement OnTheLeft/OnTheRight for SparseTriangularView::solve
Summary: Implement OnTheLeft/OnTheRight for SparseTriangularView::solve
Status: CONFIRMED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.2
Hardware: All All
: Normal Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on: ExprEval
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-27 04:34 UTC by Henrik Friberg
Modified: 2019-12-04 13:28 UTC (History)
1 user (show)



Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.