Function permutator::heap_permutation_sync
source · [−]Expand description
Heap permutation which permutate variable d
in place and call cb
function
for each permutation done on d
.
Parameter
d
an Rc<RefCell<>> to mutable slice data to be permuted.cb
a callback function that will be called several times for each permuted value.
Warning
The permutation is done in place which mean the parameter d
will be
mutated.
Notes
- The value passed to callback function will equals to value inside parameter
d
.
Breaking change from 0.3.x to 0.4
Since version 0.4.0, the first result return by this iterator will be the original value