ANN: mxNumber -- Experimental Number Types, Version 0.2.0
Dave Brueck
dbrueck at edgix.com
Fri Apr 27 15:19:49 EDT 2001
> I have taken the opportunity to expose a couple of Integer methods
>
> Integer.popcount() - number of bits set
> Integer.setbit(bit) - set the bit indicated by bit
> Integer.clrbit(bit) - set the bit indicated by bit
>
> These are very useful for Aritificial Intelligence/feature vector
algorithms. Is
> there any other desire to see these types of functions exposed? I would
be happy to
> send a patch although it's only 3 minutes of work to do...
The set/clr bit stuff would be useful for encryption routines (e.g. DES)
where you spend most of your time swapping bits around.
More information about the Python-list
mailing list