unified function for mean sq dist to point calculation
| 781 | |
| 782 | // unified function for mean sq dist to point calculation |
| 783 | float calcMeanSqDistToPointEx( const auto& pairs, auto id ) |
| 784 | { |
| 785 | return tbb::parallel_deterministic_reduce( tbb::blocked_range( decltype( id )( 0 ), decltype( id )( pairs.size() ) ), NumSum(), |
| 786 | [&] ( const auto& range, NumSum curr ) |
| 787 | { |
| 788 | for ( auto i = range.begin(); i < range.end(); ++i ) |
| 789 | { |
| 790 | if ( i == id ) |
| 791 | continue; |
| 792 | curr = curr + MR::getSumSqDistToPoint( pairs[i][id] ) + MR::getSumSqDistToPoint( pairs[id][i] ); |
| 793 | } |
| 794 | return curr; |
| 795 | }, [] ( auto a, auto b ) { return a + b; } ).rootMeanSqF(); |
| 796 | } |
| 797 | |
| 798 | void MultiwayICP::deactivateFarDistPairs_( ICPLayer l ) |
| 799 | { |
no test coverage detected