You are viewing a single comment's thread from:
RE: Particle physics - exercise 1b solution
Hi @mactro, congratulations on finishing successfully the exercise!
I found that the hardest part was to read the relevant section of the paper and make sense of it. Fortunately @lemouth was of great help to answer any question.
My only comment about your code would be to be careful about the following:
jets.erase(jet_it);
// we have to move iterator back after removing the element
jet_it--;
since erase normally invalidates the iterator. The result is unspecified and yield to unexpected behavior (or crash) with some compilers.
Apart from that, great work! :-)
Good catch, thanks!