Skip to content

num::swap_remove_map

Defined in header <container/swap_remove.hpp>

array<idx> swap_remove_map(idx n, view<const idx> removed);

Map every old index to its new one, or to removed_index.

Use this to repair indices held outside the arrays being compacted, such as the position a walker occupies or an entry in a lookup table.