MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / calcMeanSqDistToPointEx

Function calcMeanSqDistToPointEx

source/MRMesh/MRMultiwayICP.cpp:783–796  ·  view source on GitHub ↗

unified function for mean sq dist to point calculation

Source from the content-addressed store, hash-verified

781
782// unified function for mean sq dist to point calculation
783float 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
798void MultiwayICP::deactivateFarDistPairs_( ICPLayer l )
799{

Callers 1

Calls 6

NumSumClass · 0.85
getSumSqDistToPointFunction · 0.85
rootMeanSqFMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected