combinations 0.1.0

This crate give you all the combinations of values in a vec
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 3 items with examples
  • Size
  • Source code size: 6.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.02 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • meltinglava/uniquecombinations
    7 2 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • meltinglava

Project Title

This crate give you all the combinations of values in a vec

Example

let actual: Vec<_> = Combinations::new(vec![1, 2, 2, 3, 4], 3).collect();
let expected = vec![
    vec![1, 2, 2],
    vec![1, 2, 3],
    vec![1, 2, 4],
    vec![1, 3, 4],
    vec![2, 2, 3],
    vec![2, 2, 4],
    vec![2, 3, 4],
];
assert!(actual == expected);

Contributing

Any contributions are welcomed.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.