![]() |
Belle II Software
release-08-02-04
|
A mixin class to attach a set of weighted items to a class. More...
#include <WithWeightedItems.h>


Public Member Functions | |
| WithWeightedItems (const T &t) | |
| Also forward the copy constructor form the base class object. | |
| Weight | getWeight () const |
| Cumulated weight of the contained items. | |
| template<class APredicate > | |
| void | eraseIf (const APredicate &predicate) |
| Erase items from this node that satisfy the predicate. | |
| void | insert (const AItem &item, Weight weight=1.0) |
| Add an item with weight. | |
| template<class AMeasure > | |
| void | insert (const This &items, AMeasure &measure) |
| Add the items from another item range assigning a weight from the predicate. | |
| std::vector< WithWeight< AItem > >::iterator | begin () |
| Begin iterator of the contained items. | |
| std::vector< WithWeight< AItem > >::const_iterator | begin () const |
| Begin iterator of the contained items. | |
| std::vector< WithWeight< AItem > >::iterator | end () |
| End iterator of the contained items. | |
| std::vector< WithWeight< AItem > >::const_iterator | end () const |
| End iterator of the contained items. | |
| size_t | size () const |
| Getter for the number of items. | |
| void | clear () |
| Clear the contained items. | |
Private Types | |
| using | Super = T |
| Type of the base class. | |
| using | This = WithWeightedItems< T, AItem > |
| Type of this class. | |
Private Attributes | |
| std::vector< WithWeight< AItem > > | m_items |
| Memory for the weighted items. | |
| std::vector< WithWeight< AItem > >::iterator | m_itEnd {m_items.end()} |
| Memory for the end of the items that are not erased. | |
A mixin class to attach a set of weighted items to a class.
Definition at line 25 of file WithWeightedItems.h.