|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.dsi.mg4j.util.Fast
public final class Fast
All-purpose optimised static-method container class.
This class contains static optimised utility methods that are used by all MG4J classes.
| Field Summary | |
|---|---|
static int[] |
BYTELSB
Deprecated. Moved to dsiutils. |
static int[] |
BYTEMSB
Deprecated. Moved to dsiutils. |
| Method Summary | |
|---|---|
static long |
availableMemory()
Deprecated. Moved to dsiutils. |
static void |
compactMemory()
Deprecated. Moved to dsiutils. |
static void |
ensureLog4JIsConfigured()
Deprecated. Moved to dsiutils. |
static void |
ensureLog4JIsConfigured(Level level)
Deprecated. Moved to dsiutils. |
static String |
format(double d)
Deprecated. Moved to dsiutils. |
static String |
format(long l)
Deprecated. Moved to dsiutils. |
static String |
formatBinarySize(long l)
Deprecated. Moved to dsiutils. |
static String |
formatSize(long l)
Deprecated. Moved to dsiutils. |
static Logger |
getLogger(Class<?> klass)
Deprecated. Moved to dsiutils. |
static int |
int2nat(int x)
Deprecated. Moved to dsiutils. |
static long |
int2nat(long x)
Deprecated. Moved to dsiutils. |
static int |
leastSignificantBit(int x)
Deprecated. Moved to dsiutils. |
static int |
leastSignificantBit(long x)
Deprecated. Moved to dsiutils. |
static boolean |
log4JIsConfigured()
Deprecated. Moved to dsiutils. |
static boolean |
memoryIsLow()
Deprecated. Moved to dsiutils. |
static int |
mostSignificantBit(int x)
Deprecated. Moved to dsiutils. |
static int |
mostSignificantBit(long x)
Deprecated. Moved to dsiutils. |
static int |
nat2int(int x)
Deprecated. Moved to dsiutils. |
static long |
nat2int(long x)
Deprecated. Moved to dsiutils. |
static int |
percAvailableMemory()
Deprecated. Moved to dsiutils. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final int[] BYTELSB
dsiutils.
@Deprecated public static final int[] BYTEMSB
dsiutils.
| Method Detail |
|---|
@Deprecated public static int mostSignificantBit(int x)
dsiutils.
x - an integer.
@Deprecated public static int mostSignificantBit(long x)
dsiutils.
x - a long integer.
@Deprecated public static int leastSignificantBit(int x)
dsiutils.
x - an integer.
@Deprecated public static int leastSignificantBit(long x)
dsiutils.
x - a long integer.
@Deprecated public static int int2nat(int x)
dsiutils.
This method will map a negative integer x to -2x-1 and
a nonnegative integer x to 2x. It can be used to save
integers in the range [Integer.MIN_VALUE/2..Integer.MAX_VALUE/2]
(i.e., [-230..230-1])
using the standard coding methods (which all work on natural numbers). Note
that no range checks are performed.
The inverse of the above map is computed by nat2int(int).
x - an integer.
nat2int(int)@Deprecated public static int nat2int(int x)
dsiutils.
This method computes the inverse of int2nat(int).
x - a natural number.
int2nat(int)@Deprecated public static long int2nat(long x)
dsiutils.
This method will map a negative long x to -2x-1 and
a nonnegative long x to 2x. It can be used to save
longs in the range [Long.MIN_VALUE/2..Long.MAX_VALUE/2]
(i.e., [-262..262-1])
using the standard coding methods (which all work on natural numbers). Note
that no range checks are performed.
The inverse of the above map is computed by nat2int(long).
x - a long.
int2nat(int)@Deprecated public static long nat2int(long x)
dsiutils.
This method computes the inverse of int2nat(long).
x - a long natural number.
nat2int(int)@Deprecated public static String format(double d)
dsiutils.
This method formats a double separating thousands and printing just two fractional digits.
d - a number.
@Deprecated public static String format(long l)
dsiutils.
This method formats a long separating thousands.
l - a number.
@Deprecated public static String formatSize(long l)
dsiutils.
This method formats a long using suitable unit multipliers (e.g., K, M, G, and T) and printing just two fractional digits.
l - a number, representing a size (e.g., memory).
@Deprecated public static String formatBinarySize(long l)
dsiutils.
This method formats a long using suitable unit binary multipliers (e.g., Ki, Mi, Gi, and Ti) and printing no fractional digits. The argument must be a power of 2.
l - a number, representing a binary size (e.g., memory); must be a power of 2.
@Deprecated public static boolean log4JIsConfigured()
dsiutils.
@Deprecated public static void ensureLog4JIsConfigured()
dsiutils.
BasicConfigurator.configure(), and
setting the root logger level to Level.INFO.
@Deprecated public static void ensureLog4JIsConfigured(Level level)
dsiutils.
BasicConfigurator.configure(), and
setting the root logger level to level.
level - the required logging level.@Deprecated public static Logger getLogger(Class<?> klass)
dsiutils.
Logger.getLogger(java.lang.Class) method and then ensureLog4JIsConfigured().
klass - a class that will be passed to Logger.getLogger(java.lang.Class).
Logger.getLogger(java.lang.Class).@Deprecated public static boolean memoryIsLow()
dsiutils.
@Deprecated public static long availableMemory()
dsiutils.
@Deprecated public static int percAvailableMemory()
dsiutils.
@Deprecated public static void compactMemory()
dsiutils.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||