mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Clean up Eigen usage
* Replace Matrix<> with Vector<> where vectors are explicitly intended. I found these via `rg "Eigen::Matrix<double, \w+, 1>"`. * Pass all Eigen matrices by const reference. I found these via `rg "\(Eigen"` on main (the initializer list constructors make more false positives). * Replace MakeMatrix() and operator<< usage with initializer list constructors. I found these via `rg MakeMatrix` and `rg "<<"` respectively. * Deprecate MakeMatrix()
This commit is contained in:
committed by
Peter Johnson
parent
72716f51ce
commit
9359431bad
@@ -10,8 +10,7 @@
|
||||
#include "units/velocity.h"
|
||||
|
||||
TEST(FormatterTest, Eigen) {
|
||||
Eigen::Matrix<double, 3, 2> A;
|
||||
A << 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;
|
||||
Eigen::Matrix<double, 3, 2> A{{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}};
|
||||
EXPECT_EQ(
|
||||
" 1.000000 2.000000\n"
|
||||
" 3.000000 4.000000\n"
|
||||
|
||||
Reference in New Issue
Block a user