Module ben::encode::relabel

source ·
Expand description

This module contains the main functions that are used in the reben binary for relabeling the assignment vectors in a BEN file. The relabeling is done can be doe either so that the values are in ascending order or according to a mapping provided by the user in a map file.

Functions§

  • Relabels the values in a BEN file so that the assignment vector values are in ascending order. So , if the assignment vector is [2, 3, 1, 4, 5, 5, 3, 4, 2] the relabeled assignment vector will be [1, 2, 3, 4, 5, 5, 2, 4, 1].
  • Relabels the values in a BEN file so that the assignment vector values are sorted according to a mapping. The mapping is a HashMap where the key is the position in the new assignment vector and the value is the position in the old assignment vector.
  • Relabels each of the assignment vectors in a BEN file so that the values are in ascending order.
  • Relabels the values in a BEN file so that the assignment vector values are sorted according to a mapping. The mapping is a HashMap where the key is the position in the new assignment vector and the value is the position in the old assignment vector.