Interface IPointHash

All Known Subinterfaces:
FlawedPointHash
All Known Implementing Classes:
FlawedPointHash.CubeHash, FlawedPointHash.FlowerHash, FlawedPointHash.FNVHash, FlawedPointHash.LowLeaningHash, FlawedPointHash.QuiltHash, FlawedPointHash.RugHash, FlawedPointHash.SquishedCubeHash, IntPointHash, IPointHash.IntImpl, IPointHash.LongImpl, KnownSizePointHash, LongPointHash

public interface IPointHash
An interface for "point hashes", that is, functions that produce usually-unique integer results given multiple integer inputs. The hash functions this guarantees an implementor will provide all take int inputs and return an int. There are lots of cases where an implementor would have other functions that take long inputs or return longs, and in those cases the interface methods would probably be implemented by delegating to the long inputs and/or casting the result to a long. Implementors must have a setState(int) function, but it doesn't have to do anything if the algorithm doesn't support a state; similarly, hashWithState(int, int, int) can return the same thing as hash(int, int) if states aren't supported. If states are supported, then calling hash(int, int) while the state is, for example, 42 should be the same as calling hashWithState(int, int, int) with a state parameter of 42 (regardless of what the state actually is in the implementor).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A convenience abstract class to implement IPointHash when you have an int for state.
    static class 
    A convenience abstract class to implement IPointHash when you have a long for state.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    hash(int x, int y)
     
    int
    hash(int x, int y, int z)
     
    int
    hash(int x, int y, int z, int w)
     
    int
    hash(int x, int y, int z, int w, int u)
     
    int
    hash(int x, int y, int z, int w, int u, int v)
     
    int
    hashWithState(int x, int y, int state)
     
    int
    hashWithState(int x, int y, int z, int state)
     
    int
    hashWithState(int x, int y, int z, int w, int state)
     
    int
    hashWithState(int x, int y, int z, int w, int u, int state)
     
    int
    hashWithState(int x, int y, int z, int w, int u, int v, int state)
     
    int
    hashWithState(int x, int y, int z, int w, int u, int v, int m, int state)
     
    void
    setState(int state)
     
  • Method Details

    • setState

      void setState(int state)
    • hash

      int hash(int x, int y)
    • hash

      int hash(int x, int y, int z)
    • hash

      int hash(int x, int y, int z, int w)
    • hash

      int hash(int x, int y, int z, int w, int u)
    • hash

      int hash(int x, int y, int z, int w, int u, int v)
    • hashWithState

      int hashWithState(int x, int y, int state)
    • hashWithState

      int hashWithState(int x, int y, int z, int state)
    • hashWithState

      int hashWithState(int x, int y, int z, int w, int state)
    • hashWithState

      int hashWithState(int x, int y, int z, int w, int u, int state)
    • hashWithState

      int hashWithState(int x, int y, int z, int w, int u, int v, int state)
    • hashWithState

      int hashWithState(int x, int y, int z, int w, int u, int v, int m, int state)