Hi,
I am searching for a function that get as an input a number x (assuming 15), number of bits d (4) and number of permutations m (2). The output of the function will be all the numbers that are m bit's permutations from the given number x at a d length bits.
For the given numbers, (x = 15, d = 4 and m = 2) we get 6=\binom{4}{2}
different number's combination.
I would like to know if such kind of function already exist in C++ STD or boost or etc. that returns me those numbers...
P.S. if you know a function that returns all permutations' numbers till m.
regards