[eigen] Inverse of an array through .matrix()

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi everyone again. I am still writing some examples for the tutorials and came out with the following piece of code:

#include <Eigen/Dense>
#include <iostream>

using namespace Eigen;
using namespace std;

int main()
{
  ArrayXXf m(2,2);

  m << 1,2,3,4;

  // this compiles OK
  MatrixXf ww = m.matrix()..inverse();

  // ERROR: no matching function for call to ‘Eigen::TriangularView<Eigen::Matrix<float, 33331, 33331, 0, 33331, 33331>, 2u>::solveInPlace(....
  ArrayXXf xx = m.matrix().inverse();
}

I just wanted to ask if this is the way it should work or not, since I supposed that the last line should be fine.

Thanks.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/