Factorial base numbers indexing permutations of a collection: Difference between revisions

m
Minor 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;
<< std::endl << std::endl;
}
 
Line 1,033 ⟶ 1,034:
ThreadLocalRandom random = ThreadLocalRandom.current();
factoradic.clear();
for ( int i = 0; i < 52cards.size() - 1; i++ ) {
factoradic.add(random.nextInt(cards.size() - i));
}
915

edits