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:
bresch
2023-09-19 09:37:50 -04:00
committed by Daniel Agar
parent 1cbaa78eba
commit b612467593
2 changed files with 13 additions and 2 deletions
+1
View File
@@ -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,