top | item 30907469

(no title)

digiou | 3 years ago

God bless Eigen, I am using it to implement the state matrices of a Kalman Filter and it's a joy to use its APIs.

discuss

order

Rayhem|3 years ago

Eigen has one of if not the best linear algebra APIs I've ever seen. In particular, vectors are column vectors by default and you never need to touch row vectors (if I can editorialize, row vectors shouldn't exist at all), and vectors are not simply "n-by-1" matrices -- they're true vectors.

vbarrielle|3 years ago

But they are nx1 matrices in Eigen, you can call the rows() and cols() methods to check that. However, the nice part is that, since Eigen knows the number of columns at compile time, it enables vector methods such as size() in addition, which lets you handle them as true vector.

But tge nice part is that these vectors can still interact well with parts of the code that expect a matrix.

mereel|3 years ago

Could you elaborate a bit more about the difference between Nx1 matrices and "true vectors"?

benibela|3 years ago

I implemented the same thing for my master thesis project