Function ben::encode::relabel::relabel_ben_file
source · pub fn relabel_ben_file<R: Read, W: Write>(reader: R, writer: W) -> Result<()>Expand description
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].
§Arguments
reader- A reader that implements theReadtrait containing the BEN file to be relabeled.writer- A writer that implements theWritetrait and which will contain the relabeled BEN file.
§Errors
Returns an error if the file format is invalid or if there is an issue reading or writing the file.