Registered Member
|
Dear All,
I'm having a little bit of trouble finding where is the solution (i.e. the 'x' in Ax=b) of xp.lu().solve(b); For example: VectorXf lin(MatrixXf& x, RowVectorXf& xm){ MatrixXf A = MatrixXf::Random(3,3); VectorXf b = VectorXf::Ones(3); A.lu().solve(b); std::cout << "sol" << std::endl << ?? << std::endl; return solution??; } i would expect to get a 3 \times 1 vector of x such that Ax^*=1_p.... Thanks in advance, |
Registered Member
|
The solution is returned by the solve() method, so if you write "VectorXf x = A.lu().solve(b)", the solution will be in the variable x.
|
Registered Member
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]