From 97b4d1484e376ae474701788f214b9787f35bfdd Mon Sep 17 00:00:00 2001 From: Thore Wietzke Date: Sat, 9 Dec 2023 21:41:50 +0100 Subject: [PATCH] replaced for loop with assignment for fill_rws_memory() --- src/grampc_binding.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/grampc_binding.cpp b/src/grampc_binding.cpp index b1bea2d..1821224 100644 --- a/src/grampc_binding.cpp +++ b/src/grampc_binding.cpp @@ -419,13 +419,7 @@ void GrampcBinding::fill_rws_memory(Eigen::Ref rws_matrix, const Eigen:: } // copy the new data to the rws_matrix. - for (int col = 0; col < rws_matrix.cols(); col++) - { - for (int row = 0; row < rws_matrix.rows(); row++) - { - rws_matrix(row, col) = new_data(row, col); - } - } + rws_matrix = new_data; } void GrampcBinding::set_rws_u(const Eigen::Ref& u_new)