Class index_repl_dst_t

Class Documentation

class index_repl_dst_t

index replacements are many-to-one, i.e. multiple source indices may be mapped to the same destination index. This serves the role of a single destination to avoid representing each destination index by multiple copies of itself. This is needed to be able to “merge” multiple replacements efficiently. e.g. consider adding replacement p1->i1 to the current list {p1->I1, p2->I1} this means that we need to replace I1 by i1 (since i1 represents a subset of I1). With 1-to-1 representation changing I1 to i1 will require searching through all replacements. This struct makes sure that I1 will need to be replaced in 1 spot. Note that destination index may or may not have protonindices.

Public Functions

inline explicit index_repl_dst_t(Index dst, Index src)
inline const Index &dst() const
inline void update_dst(Index idx)
inline const container::svector<Index> &src() const
inline index_repl_dst_t &append_src(Index src)