27 double fracBinIdx = (
x - GetMinimum()) * fInvBinWidth;
31 double binOffset = fracBinIdx - binIdx;
37 if (IsUnderflowBin(binIdx))
41 if (IsOverflowBin(binIdx - 1))
51 return EAxisCompatibility::kIdentical;
53 int idxTargetLow = target.GetBinIndexForLowEdge(source.GetMinimum());
54 int idxTargetHigh = target.GetBinIndexForLowEdge(source.GetMaximum());
55 if (idxTargetLow < 0 || idxTargetHigh < 0)
56 return EAxisCompatibility::kIncompatible;
60 if (source.GetInverseBinWidth() == target.GetInverseBinWidth())
61 return EAxisCompatibility::kContains;
68 if (
std::fabs(target.GetInverseBinWidth() * source.GetNBinsNoOver()
69 - source.GetInverseBinWidth() * (idxTargetHigh - idxTargetLow))
70 > 1
E-6 * target.GetInverseBinWidth())
71 return EAxisCompatibility::kIncompatible;
74 return EAxisCompatibility::kSampling;
int GetBinIndexForLowEdge(double x) const noexcept
If the coordinate x is a bin low edge (within 1E-6 of the coordinate), return the bin for which this ...
static constexpr const int kNOverflowBins[4]
Extra bins for each EAxisOverflow value.
Axis with equidistant bin borders.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static Vc_ALWAYS_INLINE Vector< T > round(const Vector< T > &x)
EAxisCompatibility CanMap(TAxisEquidistant &target, TAxisEquidistant &source) noexcept
Whether (and how) the source axis can be merged into the target axis.