Belle II Software light-2406-ragdoll
RelationArray::ReplaceVec< VecType > Class Template Reference

Struct to replace indices based on a sequential container. More...

#include <RelationArray.h>

Collaboration diagram for RelationArray::ReplaceVec< VecType >:

Public Member Functions

 ReplaceVec (VecType &replace)
 Set reference to used replacement vector.
 
consolidation_type operator() (index_type old) const
 Take old index and return the new index.
 

Private Attributes

VecType & m_replace
 Reference of the used replacement vector.
 

Detailed Description

template<class VecType = std::vector<consolidation_type>>
class Belle2::RelationArray::ReplaceVec< VecType >

Struct to replace indices based on a sequential container.

No range check is performed so make sure all indices are mapped

See also
consolidate

Definition at line 132 of file RelationArray.h.

Constructor & Destructor Documentation

◆ ReplaceVec()

ReplaceVec ( VecType &  replace)
inlineexplicit

Set reference to used replacement vector.

Definition at line 136 of file RelationArray.h.

136: m_replace(replace) {}
VecType & m_replace
Reference of the used replacement vector.

Member Function Documentation

◆ operator()()

consolidation_type operator() ( index_type  old) const
inline

Take old index and return the new index.

Definition at line 139 of file RelationArray.h.

139{ return m_replace[old]; }

Member Data Documentation

◆ m_replace

VecType& m_replace
private

Reference of the used replacement vector.

Definition at line 144 of file RelationArray.h.


The documentation for this class was generated from the following file: