Skip to content

Commit

Permalink
run forward and backwards checks when looking for links, minor perfor…
Browse files Browse the repository at this point in the history
…mance penalty
  • Loading branch information
lgray committed Jun 2, 2016
1 parent cd46192 commit f2cdf47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RecoParticleFlow/PFProducer/src/PFBlockAlgo.cc
Expand Up @@ -164,7 +164,8 @@ void PFBlockAlgo::findBlocks() {
QuickUnion qu(bare_elements_.size());
const auto elem_size = bare_elements_.size();
for( unsigned i = 0; i < elem_size; ++i ) {
for( unsigned j = 0; j < i; ++j ) {
for( unsigned j = 0; j < elem_size; ++j ) {
if( j == i ) continue;
if( !_linkTests[_linkTestSquare[bare_elements_[i]->type()][bare_elements_[j]->type()]] ) {
j = ranges_[bare_elements_[j]->type()].second;
continue;
Expand Down

0 comments on commit f2cdf47

Please sign in to comment.