MRPT  2.0.0
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.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020