next_bit_permutation {mosum}R Documentation

Next value to iterate (in lexicographical order) over all bit permutaions having l bits set to 1. Example sequence (2 bits): 0011, 0101, 0110, 1001, 1010, 1100. Source: https://stackoverflow.com/questions/1851134/generate-all-binary-strings-of-length-n-with-k-bits-set

Description

Next value to iterate (in lexicographical order) over all bit permutaions having l bits set to 1. Example sequence (2 bits): 0011, 0101, 0110, 1001, 1010, 1100. Source: https://stackoverflow.com/questions/1851134/generate-all-binary-strings-of-length-n-with-k-bits-set

Usage

next_bit_permutation(v)

[Package mosum version 1.2.7 Index]