39 mapping(_In_ T _from, _In_ T _to) : from(_from), to(_to) {}
48 bool operator==(
const mapping& other)
const {
return from == other.from && to == other.to; }
68 return mapping(from + other.from, to + other.to);
72 template <
class T,
class AX = std::allocator<mapping<T>>>
73 using mapping_vector = std::vector<mapping<T>, AX>;
Maps index in source string to index in destination string.
Definition mapping.hpp:17
mapping(T x)
Constructs an id mapping.
Definition mapping.hpp:31
bool operator==(const mapping &other) const
Are mappings identical?
Definition mapping.hpp:48
mapping()
Constructs a zero to zero mapping.
Definition mapping.hpp:24
bool operator!=(const mapping &other) const
Are mappings different?
Definition mapping.hpp:57
mapping operator+(const mapping &other) const
Adds two mappings by components.
Definition mapping.hpp:66
mapping(T _from, T _to)
Constructs a mapping.
Definition mapping.hpp:39