Package squidpony.squidmath
Class FlawedPointHash.FNVHash
java.lang.Object
squidpony.squidmath.IPointHash.IntImpl
squidpony.squidmath.FlawedPointHash.FNVHash
- All Implemented Interfaces:
FlawedPointHash
,IFlawed
,IPointHash
- Enclosing interface:
- FlawedPointHash
public static class FlawedPointHash.FNVHash extends IPointHash.IntImpl implements FlawedPointHash
FNV32a is OK as a hash for bytes when used in some hash tables, but it has major issues on its low-order bits
when used as a point hash (the high bits aren't much better). Unfortunately, it is not aesthetically pleasing as
a point hash. Some usages might be able to use it to apply a grimy, glitchy effect.
-
Nested Class Summary
Nested classes/interfaces inherited from interface squidpony.squidmath.FlawedPointHash
FlawedPointHash.CubeHash, FlawedPointHash.FNVHash, FlawedPointHash.QuiltHash, FlawedPointHash.RugHash
Nested classes/interfaces inherited from interface squidpony.squidmath.IPointHash
IPointHash.IntImpl, IPointHash.LongImpl
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
getState()
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 v, int state)
Methods inherited from class squidpony.squidmath.IPointHash.IntImpl
hash, hash, hash, hash, setState
-
Constructor Details
-
Method Details
-
getState
-
hashWithState
- Specified by:
hashWithState
in interfaceIPointHash
-
hashWithState
- Specified by:
hashWithState
in interfaceIPointHash
-
hashWithState
- Specified by:
hashWithState
in interfaceIPointHash
-
hashWithState
- Specified by:
hashWithState
in interfaceIPointHash
-