org.apache.lucene.util.hppc

## Class BitMixer

- java.lang.Object
- - org.apache.lucene.util.hppc.BitMixer

-     public final class BitMixer
      extends Object

  Bit mixing utilities. The purpose of these methods is to evenly distribute key space over int32 range.

  Forked from com.carrotsearch.hppc.BitMixer

  github: https://github.com/carrotsearch/hppc release: 0.9.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BitMixer()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `mix(byte key)`
    `static int` | `mix(char key)`
    `static int` | `mix(double key)`
    `static int` | `mix(float key)`
    `static int` | `mix(int key)`
    `static int` | `mix(long key)`
    `static int` | `mix(Object key)`
    `static int` | `mix(short key)`
    `static int` | `mix32(int k)` MH3's plain finalization step.
    `static long` | `mix64(long z)` Computes David Stafford variant 9 of 64bit mix function (MH3 finalization step, with different shifts and constants).
    `static int` | `mixPhi(byte k)`
    `static int` | `mixPhi(char k)`
    `static int` | `mixPhi(double k)`
    `static int` | `mixPhi(float k)`
    `static int` | `mixPhi(int k)`
    `static int` | `mixPhi(long k)`
    `static int` | `mixPhi(Object k)`
    `static int` | `mixPhi(short k)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BitMixer

          public BitMixer()

  - ### Method Detail

    - #### mix

          public static int mix(byte key)

    - #### mix

          public static int mix(short key)

    - #### mix

          public static int mix(char key)

    - #### mix

          public static int mix(int key)

    - #### mix

          public static int mix(float key)

    - #### mix

          public static int mix(double key)

    - #### mix

          public static int mix(long key)

    - #### mix

          public static int mix(Object key)

    - #### mix32

          public static int mix32(int k)

      MH3's plain finalization step.

    - #### mix64

          public static long mix64(long z)

      Computes David Stafford variant 9 of 64bit mix function (MH3 finalization step, with different shifts and constants).

      Variant 9 is picked because it contains two 32-bit shifts which could be possibly optimized into better machine code.

      See Also:
        "http://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html"

    - #### mixPhi

          public static int mixPhi(byte k)

    - #### mixPhi

          public static int mixPhi(char k)

    - #### mixPhi

          public static int mixPhi(short k)

    - #### mixPhi

          public static int mixPhi(int k)

    - #### mixPhi

          public static int mixPhi(float k)

    - #### mixPhi

          public static int mixPhi(double k)

    - #### mixPhi

          public static int mixPhi(long k)

    - #### mixPhi

          public static int mixPhi(Object k)

Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.