13#include <gtest/gtest.h>
148TEST(TrackFindingCDCTest, Eigen_fullPivLu_inverse)
150 Eigen::Matrix<double, 2, 2> weight;
156 Eigen::Matrix<double, 2, 2> cov = weight.fullPivLu().inverse();
158 EXPECT_NEAR(1.0 / 2.0, cov(0, 0), 10e-7);
159 EXPECT_NEAR(0.0, cov(0, 1), 10e-7);
160 EXPECT_NEAR(0.0, cov(1, 0), 10e-7);
161 EXPECT_NEAR(0.0, cov(1, 1), 10e-7);
199TEST(TrackFindingCDCTest, Eigen_colPivHouseholderQr_inverse)
201 Eigen::Matrix<double, 2, 2> weight;
207 Eigen::Matrix<double, 2, 2> cov = weight.colPivHouseholderQr().inverse();
209 EXPECT_NEAR(1.0 / 2.0, cov(0, 0), 10e-7);
210 EXPECT_NEAR(0.0, cov(0, 1), 10e-7);
211 EXPECT_NEAR(0.0, cov(1, 0), 10e-7);
212 EXPECT_NEAR(0.0, cov(1, 1), 10e-7);
215TEST(TrackFindingCDCTest, Eigen_fullPivHouseholderQr_inverse)
217 Eigen::Matrix<double, 2, 2> weight;
223 Eigen::Matrix<double, 2, 2> cov = weight.fullPivHouseholderQr().inverse();
225 EXPECT_NEAR(1.0 / 2.0, cov(0, 0), 10e-7);
226 EXPECT_NEAR(0.0, cov(0, 1), 10e-7);
227 EXPECT_NEAR(0.0, cov(1, 0), 10e-7);
228 EXPECT_NEAR(0.0, cov(1, 1), 10e-7);