Skip to content

Commit

Permalink
Use std::vector<bool>
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn authored and iglesias committed May 20, 2024
1 parent 41c7b2e commit 2611cf0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/tapkee/routines/landmarks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> to_process(n_vectors, true);

DenseMatrix embedding(n_vectors, target_dimension);

Expand Down Expand Up @@ -72,8 +71,6 @@ DenseMatrix triangulate(RandomAccessIterator begin, RandomAccessIterator end, Pa
}
}

delete[] to_process;

return embedding;
}

Expand Down

0 comments on commit 2611cf0

Please sign in to comment.