Package it.unimi.dsi.test
Class LeastSignificantBitSpeedTest
java.lang.Object
it.unimi.dsi.test.LeastSignificantBitSpeedTest
public class LeastSignificantBitSpeedTest extends Object
-
Constructor Summary
Constructors Constructor Description LeastSignificantBitSpeedTest() -
Method Summary
Modifier and Type Method Description static intjavaLsb(long value)static intleastSignificantBit(long value)Computes the least-significant bit of the specifiedlongthat is set to1.static voidmain(String[] a)
-
Constructor Details
-
LeastSignificantBitSpeedTest
public LeastSignificantBitSpeedTest()
-
-
Method Details
-
leastSignificantBit
public static int leastSignificantBit(long value)Computes the least-significant bit of the specifiedlongthat is set to1. Zero-indexed.- Parameters:
value- thelongwhose least-significant bit is desired.- Returns:
- the least-significant bit of the specified
long.-1is returned if there are no bits set.
-
javaLsb
public static int javaLsb(long value) -
main
-