mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 03:03:33 +08:00
square matrix: add partial trace computation
This is useful when we need the sum of some variances in a large covariance matrix
This commit is contained in:
@@ -47,6 +47,7 @@ TEST(MatrixSquareTest, Square)
|
||||
|
||||
EXPECT_EQ(A.diag(), diag_check);
|
||||
EXPECT_FLOAT_EQ(A.trace(), 16);
|
||||
EXPECT_FLOAT_EQ(A.trace<2>(1), 15);
|
||||
|
||||
float data_check[9] = {
|
||||
1.01158503f, 0.02190432f, 0.03238144f,
|
||||
|
||||
Reference in New Issue
Block a user