Package squidpony.squidmath
Interface FlawedPointHash
- All Superinterfaces:
IFlawed
,IPointHash
- All Known Implementing Classes:
FlawedPointHash.CubeHash
,FlawedPointHash.FNVHash
,FlawedPointHash.QuiltHash
,FlawedPointHash.RugHash
@Beta public interface FlawedPointHash extends IPointHash, IFlawed
An interface for point hashes that are statistically biased, as well as a holder for inner classes that implement
this. The point hashes here are mostly chosen because they are aesthetically interesting, at least on some of their
output bits.
Don't count on this class giving reliable output; it is marked Beta and will remain so. If you want to ensure a particular behavior of a FlawedPointHash can be replicated, copy the implementation into your own code.
Created by Tommy Ettinger on 4/14/2020.
Don't count on this class giving reliable output; it is marked Beta and will remain so. If you want to ensure a particular behavior of a FlawedPointHash can be replicated, copy the implementation into your own code.
Created by Tommy Ettinger on 4/14/2020.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FlawedPointHash.CubeHash
Very similar toFlawedPointHash.QuiltHash
, but this doesn't change the pattern in different large squares, and instead repeats a square or cube of symmetric and patterned results over and over (so it can be tiled).static class
FlawedPointHash.FNVHash
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).static class
FlawedPointHash.QuiltHash
Extremely flawed if you're using this as a point hash, but meant to be aesthetically interesting, this produces different symmetrical patterns in squares, as if on a quilt.static class
FlawedPointHash.RugHash
Produces hashes that show strong bias on one axis (usually the later axes matter more) and have nice-looking patterns of dots.Nested classes/interfaces inherited from interface squidpony.squidmath.IPointHash
IPointHash.IntImpl, IPointHash.LongImpl
-
Method Summary
Methods inherited from interface squidpony.squidmath.IPointHash
hash, hash, hash, hash, hashWithState, hashWithState, hashWithState, hashWithState, setState