RE: Particle physics - exercise 1b solution

You are viewing a single comment's thread from:

Particle physics - exercise 1b solution

in utopian-io •  7 years ago 

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! :-)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Good catch, thanks!