Class FlawedPointHash.LowLeaningHash
java.lang.Object
com.github.yellowstonegames.grid.IPointHash.IntImpl
com.github.yellowstonegames.grid.FlawedPointHash.LowLeaningHash
- All Implemented Interfaces:
com.github.yellowstonegames.core.IFlawed, FlawedPointHash, IPointHash
- Enclosing interface:
FlawedPointHash
public static class FlawedPointHash.LowLeaningHash
extends IPointHash.IntImpl
implements FlawedPointHash
Makes smaller results on average, with a biased average at about 25% of the range instead of 50% of the range for
most non-biased hashes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface FlawedPointHash
FlawedPointHash.CubeHash, FlawedPointHash.FlowerHash, FlawedPointHash.FNVHash, FlawedPointHash.LowLeaningHash, FlawedPointHash.QuiltHash, FlawedPointHash.RugHash, FlawedPointHash.SquishedCubeHashNested classes/interfaces inherited from interface IPointHash
IPointHash.IntImpl, IPointHash.LongImpl -
Field Summary
Fields inherited from class IPointHash.IntImpl
state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetState()inthashWithState(int x, int y, int s) inthashWithState(int x, int y, int z, int s) inthashWithState(int x, int y, int z, int w, int s) inthashWithState(int x, int y, int z, int w, int u, int s) inthashWithState(int x, int y, int z, int w, int u, int v, int s) inthashWithState(int x, int y, int z, int w, int u, int v, int m, int s)
-
Constructor Details
-
LowLeaningHash
public LowLeaningHash() -
LowLeaningHash
public LowLeaningHash(int state)
-
-
Method Details
-
getState
public int getState() -
hashWithState
public int hashWithState(int x, int y, int s) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int s) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int s) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int u, int s) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int u, int v, int s) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int u, int v, int m, int s) - Specified by:
hashWithStatein interfaceIPointHash
-