fix bugprone-multi-level-implicit-pointer-conversio
[liba.git] / java / src / liba.java
blob1f0ff9c97a209fa9a5d04d742698b0fed0a09a46
1 /**
2 * algorithm library
3 */
4 public class liba {
5 /** algorithm library version string */
6 public static final String VERSION;
7 static {
8 System.loadLibrary("a");
9 VERSION = "0.1.9";
10 clinit();
13 static final native void clinit();
15 /**
16 * square root of an unsigned integer
18 * @param x independent variable
19 * @return calculated result
21 public static final native int isqrt(int x);
23 /**
24 * square root of an unsigned integer
26 * @param x independent variable
27 * @return calculated result
29 public static final native int isqrt(long x);
31 /**
32 * reciprocal of square-root
34 * @param x independent variable
35 * @return calculated result
37 public static final native float rsqrt(float x);
39 /**
40 * reciprocal of square-root
42 * @param x independent variable
43 * @return calculated result
45 public static final native double rsqrt(double x);
47 /**
48 * a hash function whose prime number is 131
50 * @param block block to be processed
51 * @param value initial value
52 * @return hash value
54 public static final native int hash_bkdr(byte[] block, int value);
56 /**
57 * a hash function whose prime number is 65599
59 * @param block block to be processed
60 * @param value initial value
61 * @return hash value
63 public static final native int hash_sdbm(byte[] block, int value);
65 private liba() {