Class liba


public class liba extends Object
algorithm library
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    algorithm library version string
  • Method Summary

    Modifier and Type
    Method
    Description
    static final int
    hash_bkdr(byte[] block, int value)
    a hash function whose prime number is 131
    static final int
    hash_sdbm(byte[] block, int value)
    a hash function whose prime number is 65599
    static final int
    isqrt(int x)
    square root of an unsigned integer
    static final int
    isqrt(long x)
    square root of an unsigned integer
    static final double
    rsqrt(double x)
    reciprocal of square-root
    static final float
    rsqrt(float x)
    reciprocal of square-root

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VERSION

      public static final String VERSION
      algorithm library version string
  • Method Details

    • 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 processed
      value - 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 processed
      value - initial value
      Returns:
      hash value