News for hackers. Stuff that matters.
Re:EABitTricks.h by TeMPOraL on Monday December 19, 2022 @12:04PM (#34054483)
Can you explain what you mean by "set" and "subset"? What do they contain? How they're represented? I can't make heads or tails of your answer as-is.
Re:EABitTricks.h by doomrobo on Monday December 19, 2022 @12:12PM (#34054585)
Take a 64 bit number and treat it like a bit field where each bit represents inclusion/exclusion of an element in a set S of size 64. Thus every number with M 1s represents a (distinct) M-sized subset of S
Re:EABitTricks.h by rzzzt on Monday December 19, 2022 @12:09PM (#34054551)
Iterates through all possible N-combinations of a set that has M elements?
Re:EABitTricks.h by nerdponx on Monday December 19, 2022 @12:48PM (#34055070)
Every bit in a bitfield represents a "thing". The bitfield represents a collection of distinct things. If bit "i" is 1, then the corresponding thing "i" is in the collection.