From 840cf1d7f1f772ea324cc2f0283b27e7122dc708 Mon Sep 17 00:00:00 2001 From: Sergey Lisitsyn Date: Mon, 20 May 2024 16:25:24 +0100 Subject: [PATCH] Use std::vector --- include/tapkee/routines/landmarks.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/tapkee/routines/landmarks.hpp b/include/tapkee/routines/landmarks.hpp index 395025b..ecb822b 100644 --- a/include/tapkee/routines/landmarks.hpp +++ b/include/tapkee/routines/landmarks.hpp @@ -36,8 +36,7 @@ DenseMatrix triangulate(RandomAccessIterator begin, RandomAccessIterator end, Pa const IndexType n_vectors = end - begin; const IndexType n_landmarks = landmarks.size(); - bool* to_process = new bool[n_vectors]; - std::fill(to_process, to_process + n_vectors, true); + std::vector to_process(n_vectors, true); DenseMatrix embedding(n_vectors, target_dimension); @@ -72,8 +71,6 @@ DenseMatrix triangulate(RandomAccessIterator begin, RandomAccessIterator end, Pa } } - delete[] to_process; - return embedding; }