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

Function getSumSqDistToPoint

source/MRMesh/MRICP.cpp:481–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481NumSum getSumSqDistToPoint( const IPointPairs& pairs, std::optional<double> inaccuracy )
482{
483 NumSum res;
484 for ( size_t idx : pairs.active )
485 {
486 const auto& vp = pairs[idx];
487 if ( inaccuracy )
488 res.sum += sqr( std::sqrt( vp.distSq ) - *inaccuracy );
489 else
490 res.sum += vp.distSq;
491 ++res.num;
492 }
493 return res;
494}
495
496NumSum getSumSqDistToPlane( const IPointPairs& pairs, std::optional<double> inaccuracy )
497{

Callers 4

getMeanSqDistToPointMethod · 0.85
getMeanSqDistToPointFunction · 0.85
getMeanSqDistToPointMethod · 0.85
calcMeanSqDistToPointExFunction · 0.85

Calls 1

sqrFunction · 0.70

Tested by

no test coverage detected