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

Method getMeanSqDistToPoint

source/MRMesh/MRMultiwayICP.cpp:457–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457float MultiwayICP::getMeanSqDistToPoint( std::optional<double> value ) const
458{
459 NumSum numSum;
460 for ( ICPLayer l( 0 ); l < pairsGridPerLayer_.size(); ++l )
461 {
462 const auto& pairs = pairsGridPerLayer_[l];
463 numSum = numSum + tbb::parallel_deterministic_reduce( tbb::blocked_range( size_t( 0 ), pairs.size() * pairs.size() ), NumSum(),
464 [&] ( const auto& range, NumSum curr )
465 {
466 for ( size_t r = range.begin(); r < range.end(); ++r )
467 {
468 size_t i = r % pairs.size();
469 size_t j = r / pairs.size();
470 if ( i == j )
471 continue;
472 curr = curr + MR::getSumSqDistToPoint( pairs[ICPElementId( i )][ICPElementId( j )], value );
473 }
474 return curr;
475 }, [] ( auto a, auto b ) { return a + b; } );
476 }
477 return numSum.rootMeanSqF();
478}
479
480float MultiwayICP::getMeanSqDistToPlane( std::optional<double> value ) const
481{

Callers

nothing calls this directly

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