|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.util.math.Logs
public class Logs
simple utilities with logarithms
| Constructor Summary | |
|---|---|
Logs()
|
|
| Method Summary | |
|---|---|
static int |
binaryLogUp(int n)
Binary log: finds the smallest power k such that 2^k>=n |
static int |
binaryLogUp(long n)
Binary log: finds the smallest power k such that 2^k>=n |
static boolean |
isPowerOf2(int x)
|
static int |
log2(int x)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Logs()
| Method Detail |
|---|
public static boolean isPowerOf2(int x)
public static int log2(int x)
throws java.lang.IllegalArgumentException
x - where x == 2^n for some integer n
java.lang.IllegalArgumentExceptionpublic static int binaryLogUp(int n)
public static int binaryLogUp(long n)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||