Factorial base numbers indexing permutations of a collection: Difference between revisions
Factorial base numbers indexing permutations of a collection (view source)
Revision as of 20:45, 30 June 2024
, 7 days agoMinor code alteration.
m (Formatting long lines of code.) |
m (Minor code alteration.) |
||
(One intermediate revision by the same user not shown) | |||
Line 331:
std::cout << code + " --> " << std::endl;
factoradic = convert_to_vector_of_integer(code);
std::cout << to_string<std::string>(permutation<std::string>(cards, factoradic), " ")
<< std::endl << std::endl;
}
Line 1,033 ⟶ 1,034:
ThreadLocalRandom random = ThreadLocalRandom.current();
factoradic.clear();
for ( int i = 0; i <
factoradic.add(random.nextInt(cards.size() - i));
}
|