Reputation: 11
I need to convert my MATLAB code to C++, which include linear equations in the form xA=0.
I know that Eigen can deal linear equations Ax=b. I am asking: is there a way to solve a system of linear equations xA=b, using Eigen for C++ (Visual Studio 2010), with A being a sparse matrix? If not, what library can I use?
Thank you for any help.
Upvotes: 0
Views: 1481
Reputation: 5198
x*A = b is equivalent to A.transpose() * z = b.transpose(); x = z.transpose() which can be solved for x.
Note, that storage operations are cheap in comparison to the solving of the linear system. A is sparse and the sparsity remains the same for the transpose operation. Often, transposition is just a flag and a change in the addressing of the elements. From my first glance into the doc this does not apply to Eigen. But, from what I told you before, this does not matter so much.
Upvotes: 0