Interface FlawedPointHash
- All Superinterfaces:
com.github.yellowstonegames.core.IFlawed, IPointHash
- All Known Implementing Classes:
FlawedPointHash.CubeHash, FlawedPointHash.FlowerHash, FlawedPointHash.FNVHash, FlawedPointHash.LowLeaningHash, FlawedPointHash.QuiltHash, FlawedPointHash.RugHash, FlawedPointHash.SquishedCubeHash
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.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classVery 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 classstatic classFNV32a 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 classMakes 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.static classExtremely 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 classProduces hashes that show strong bias on one axis (usually the later axes matter more) and have nice-looking patterns of dots.static classLike CubeHash, but with a squished Z axis in 3D and 4D, as well as a squashed W axis in 4D.Nested classes/interfaces inherited from interface IPointHash
IPointHash.IntImpl, IPointHash.LongImpl -
Method Summary
Methods inherited from interface IPointHash
hash, hash, hash, hash, hash, hashWithState, hashWithState, hashWithState, hashWithState, hashWithState, hashWithState, setState