Class liba
- java.lang.Object
-
- liba
-
public class liba extends java.lang.Object
algorithm library
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
VERSION
algorithm library version string
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
hash_bkdr(byte[] block, int value)
a hash function whose prime number is 131static int
hash_sdbm(byte[] block, int value)
a hash function whose prime number is 65599static int
isqrt(int x)
square root of an unsigned integerstatic int
isqrt(long x)
square root of an unsigned integerstatic double
rsqrt(double x)
reciprocal of square-rootstatic float
rsqrt(float x)
reciprocal of square-root
-
-
-
Method Detail
-
isqrt
public static final int isqrt(int x)
square root of an unsigned integer- Parameters:
x
- independent variable- Returns:
- calculated result
-
isqrt
public static final int isqrt(long x)
square root of an unsigned integer- Parameters:
x
- independent variable- Returns:
- calculated result
-
rsqrt
public static final float rsqrt(float x)
reciprocal of square-root- Parameters:
x
- independent variable- Returns:
- calculated result
-
rsqrt
public static final double rsqrt(double x)
reciprocal of square-root- Parameters:
x
- independent variable- Returns:
- calculated result
-
hash_bkdr
public static final int hash_bkdr(byte[] block, int value)
a hash function whose prime number is 131- Parameters:
block
- block to be processedvalue
- initial value- Returns:
- hash value
-
hash_sdbm
public static final int hash_sdbm(byte[] block, int value)
a hash function whose prime number is 65599- Parameters:
block
- block to be processedvalue
- initial value- Returns:
- hash value
-
-