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; }