18     const std::multimap<double, mrpt::tfest::TMatchingPair>& sorted, 
Pairings& 
out,
 
   24     if (sorted.empty()) 
return;
 
   26     const double largestError = sorted.rbegin()->first;
 
   27     const double threshold    = largestError * ratio;
 
   29     for (
auto it = sorted.rbegin(); it != sorted.rend(); ++it)
 
   31         const double err = it->first;
 
   33         if (err < threshold && 
out.paired_pt2pt.size() >= 3) 
break;
 
   34         out.paired_pt2pt.push_back(it->second);
 
   46     const double                                      ratio = 0.25;
 
   47     std::multimap<double, mrpt::tfest::TMatchingPair> sortedOut;
 
   54         const auto  pt_g = relPose.composePoint(p.pt_local);
 
   55         const auto& pl   = p.pl_global.plane;
 
   57         const auto plNormal = pl.getNormalVector();
 
   59         ASSERT_NEAR_(plNormal.norm(), 1.0, 1e-4);
 
   62         const double d = pl.evaluatePoint(pt_g);
 
   64         const mrpt::math::TPoint3D c = pt_g - (plNormal * 
d);
 
   66         mrpt::tfest::TMatchingPair new_p;
 
   72         new_p.local  = p.pt_local;
 
   74         sortedOut.insert({std::abs(
d), new_p});
 
   76     out.paired_pt2pl.clear();
 
   85         const auto  pt_g = relPose.composePoint(p.pt_local);
 
   86         const auto& ln   = p.ln_global;
 
   88         const mrpt::math::TPoint3D c = ln.closestPointTo(pt_g);
 
   89         const double               d = (c - pt_g).norm();
 
   91         mrpt::tfest::TMatchingPair new_p;
 
   97         new_p.local  = p.pt_local;
 
   99         sortedOut.insert({std::abs(
d), new_p});
 
  101     out.paired_pt2ln.clear();