From b205db6f1303cee3a003101107d7e30801ed6b78 Mon Sep 17 00:00:00 2001 From: Beomki Yeo Date: Mon, 2 Dec 2024 10:53:22 -0800 Subject: [PATCH] Add vector test --- .../cpu/propagator/backward_propagation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration_tests/cpu/propagator/backward_propagation.cpp b/tests/integration_tests/cpu/propagator/backward_propagation.cpp index ad085c914..b5a4d36a2 100644 --- a/tests/integration_tests/cpu/propagator/backward_propagation.cpp +++ b/tests/integration_tests/cpu/propagator/backward_propagation.cpp @@ -130,8 +130,18 @@ GTEST_TEST(detray_propagator, backward_propagation) { EXPECT_EQ(bound_param2.surface_link().id(), surface_id::e_sensitive); EXPECT_EQ(bound_param2.surface_link().index(), 0u); + const auto bound_vec0 = bound_param0.vector(); + const auto bound_vec2 = bound_param2.vector(); + + // Check vector + for (unsigned int i = 0u; i < e_bound_size; i++) { + EXPECT_NEAR(matrix_operator().element(bound_vec0, i, 0), + matrix_operator().element(bound_vec2, i, 0), tol); + } + const auto bound_cov0 = bound_param0.covariance(); const auto bound_cov2 = bound_param2.covariance(); + // Check covaraince for (unsigned int i = 0u; i < e_bound_size; i++) { for (unsigned int j = 0u; j < e_bound_size; j++) {