BitArray: count the number of bits set

yawniek via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 1 05:21:52 PST 2016


On Tuesday, 1 March 2016 at 09:32:20 UTC, Andrea Fontana wrote:
> Maybe you should look for "hamming weight" :)
maybe. and here is a snowman for you: ☃

the question was if it exists for BitArray in phobos.

https://issues.dlang.org/show_bug.cgi?id=10239 so apparently its 
really missing in phobos BitArray. the algo is even described in 
TDPL.



More information about the Digitalmars-d-learn mailing list