MRPT  2.0.4
Vectors, matrices, linear Algebra

Dynamic and fixed-size vectors and matrices, basic linear Algebra.

Design rationale

Unlike in older MRPT 1.x versions, matrices and vectors since MRPT v2.0.0 do no longer inherit from Eigen classes. Instead, they are now thin wrappers around static/dynamic memory containers, which can be casted to Eigen-compatible classes, but which allow most common operations to be done without Eigen.

The reason for this scheme is two-fold:

Important facts

Example: matrix sum (MRPT methods, no explicit call to Eigen)

#include <iostream>
// ...
M1.setDiagonal(4,0.1);
//M1.loadFromTextFile("M1.txt");
// Sum:
std::cout << "R:\n" << R << "\n";
R.saveToTextFile("R.txt");

Example: QR-based linear system solving (With explicit call to Eigen)

#include <Eigen/Dense> // Must add this one to use .asEigen()
#include <iostream>
// ...
A.setDiagonal(3,0.2);
b.fill(0.1);;
// Solve Ax=b
x.asEigen() = A.asEigen().fullPivHouseholderQr().solve(x);
std::cout << "x:\n" << x.asString() << "\n";

See list of classes below.

Collaboration diagram for Vectors, matrices, linear Algebra:



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020