int start, pointer, currentSize, counter = 0;
//while not all points are seen
//loop over cycles
while (counter < permutation.length) {
//get first point that was not already traversed
start = pointer = used.nextZeroBit(0);
currentSize = 0;
//processing current cycle
//loop over current cycle
do {
assert !used.get(pointer);