![]() |
Belle II Software
release-08-02-04
|
Multiple entries can be added, but only the one will be kept, which has the best quality estimator. More...
#include <BestMatchContainer.h>
Public Types | |
| typedef std::function< bool(TEstimator, TEstimator)> | EstimatorComparison |
| Lambda typedef for the function comparing estimators. More... | |
Public Member Functions | |
| bool | add (TItem item, TEstimator est, EstimatorComparison estComparison=[](TEstimator currentBest, TEstimator newEst) {return newEst< currentBest;}) |
| Add a new item with an estimator value. More... | |
| bool | hasMatch () const |
| TItem const & | getBestMatch () const |
Private Member Functions | |
| void | setBestMatch (TItem item, TEstimator est) |
| Set a new item as the best match. | |
Private Attributes | |
| std::optional< TItem > | m_bestMatch |
| Stores the best matched item. | |
| TEstimator | m_bestEstimator = TEstimator() |
| Stores the estimator value of the best match. | |
Multiple entries can be added, but only the one will be kept, which has the best quality estimator.
This class can be used in cases where the best-match candidate is searched
Definition at line 27 of file BestMatchContainer.h.
| typedef std::function< bool(TEstimator, TEstimator)> EstimatorComparison |
Lambda typedef for the function comparing estimators.
Returns true if the second parameter is a better estimation than the first one.
Definition at line 34 of file BestMatchContainer.h.
|
inline |
Add a new item with an estimator value.
| item | item |
| est | estimator |
| estComparison | The default estimator will favor items with smaller estimates |
Definition at line 44 of file BestMatchContainer.h.
|
inline |
Definition at line 76 of file BestMatchContainer.h.
|
inline |
Definition at line 67 of file BestMatchContainer.h.