Skip to content

tiby312/reorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple crate that will reorder a slice based on a slice of indices without an auxiliary array.

Check it out on crates.io and github and docs.rs.

Example

fn main() {
    
    let (mut arr, mut ind, res) = (
        [50, 40, 70, 60, 90, 10],
        [03, 00, 04, 01, 02, 05],
        [40, 60, 90, 50, 70, 10],
    );
    reorder_index(&mut arr, &mut ind);
    assert_eq!(arr, res);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages