|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.backend.util.Misc
Miscellaneous functions
| Constructor Summary | |
Misc()
|
|
| Method Summary | |
static int |
binlog(int pattern)
Return rightmost 1's position |
static int |
binlog(long pattern)
Return binary logarithm. |
static int |
clp2(int x)
Round up to next powers of 2. |
static int |
count1s(int x)
Return number of 1's in x. |
static boolean |
powersOf2(long x)
Return true if x is powers of 2. |
static void |
sort(int[] a,
int n)
Sort integer vector in ascending order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Misc()
| Method Detail |
public static void sort(int[] a,
int n)
public static int clp2(int x)
x - number to be rounded up.
public static boolean powersOf2(long x)
public static int binlog(long pattern)
public static int binlog(int pattern)
public static int count1s(int x)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||