From 97614941b7d98dde431104b4229630f27d9c485a Mon Sep 17 00:00:00 2001 From: Dario Izzo Date: Fri, 22 Apr 2022 15:17:08 +0200 Subject: [PATCH] review 3 --- src/problems/unconstrain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/problems/unconstrain.cpp b/src/problems/unconstrain.cpp index 0f7003530..4d73b847c 100644 --- a/src/problems/unconstrain.cpp +++ b/src/problems/unconstrain.cpp @@ -255,9 +255,9 @@ vector_double unconstrain::batch_fitness(const vector_double & xs) const vector_double z; // will be resized in penalize if necessary. for (vector_double::size_type i = 0; i < n_dvs; ++ i) { - std::copy(original_fitness.data() + i * nobj, original_fitness.data() + (i + 1) * nobj, y.begin()); + std::copy(original_fitness.data() + i * nobj, original_fitness.data() + (i + 1) * nobj, y.data()); penalize(y, z); - std::copy(z.begin(), z.begin() + nobj, retval.begin() + i * nobj); + std::copy(z.data(), z.data() + nobj, retval.data() + i * nobj); } return retval; }