@Beta public class HappyPointHash extends IPointHash.LongImpl
IntPointHash
in most respects, but uses longs. Marked Beta, may change!
IPointHash
and has a long it uses internally for state, exposed by getState()
.IPointHash.IntImpl, IPointHash.LongImpl
Modifier and Type | Field and Description |
---|---|
static HappyPointHash |
INSTANCE |
state
Constructor and Description |
---|
HappyPointHash() |
HappyPointHash(int state) |
HappyPointHash(long state) |
Modifier and Type | Method and Description |
---|---|
long |
getState() |
static int |
hash256(long x,
long y,
long s)
Gets an 8-bit point hash of a 2D point (x and y are both longs) and a state/seed as a long.
|
static int |
hash256(long x,
long y,
long z,
long s)
Gets an 8-bit point hash of a 3D point (x, y, and z are all longs) and a state/seed as a long.
|
static int |
hash256(long x,
long y,
long z,
long w,
long s)
Gets an 8-bit point hash of a 4D point (x, y, z, and w are all longs) and a state/seed as a long.
|
static int |
hash256(long x,
long y,
long z,
long w,
long u,
long s)
Gets an 8-bit point hash of a 5D point (x, y, z, w, and u are all longs) and a state/seed as a long.
|
static int |
hash256(long x,
long y,
long z,
long w,
long u,
long v,
long s)
Gets an 8-bit point hash of a 6D point (x, y, z, w, u, and v are all longs) and a state/seed as a long.
|
static int |
hash32(long x,
long y,
long s)
Gets a 5-bit point hash of a 2D point (x and y are both longs) and a state/seed as a long.
|
static int |
hash32(long x,
long y,
long z,
long s)
Gets a 5-bit point hash of a 3D point (x, y, and z are all longs) and a state/seed as a long.
|
static int |
hash32(long x,
long y,
long z,
long w,
long s)
Gets a 5-bit point hash of a 4D point (x, y, z, and w are all longs) and a state/seed as a long.
|
static int |
hash32(long x,
long y,
long z,
long w,
long u,
long s)
Gets a 5-bit point hash of a 5D point (x, y, z, w, and u are all longs) and a state/seed as a long.
|
static int |
hash32(long x,
long y,
long z,
long w,
long u,
long v,
long s)
Gets a 5-bit point hash of a 6D point (x, y, z, w, u, and v are all longs) and a state/seed as a long.
|
static int |
hash64(long x,
long y,
long s)
Gets a 6-bit point hash of a 2D point (x and y are both longs) and a state/seed as a long.
|
static int |
hash64(long x,
long y,
long z,
long s)
Gets a 6-bit point hash of a 3D point (x, y, and z are all longs) and a state/seed as a long.
|
static int |
hash64(long x,
long y,
long z,
long w,
long s)
Gets a 6-bit point hash of a 4D point (x, y, z, and w are all longs) and a state/seed as a long.
|
static int |
hash64(long x,
long y,
long z,
long w,
long u,
long s)
Gets a 6-bit point hash of a 5D point (x, y, z, w, and u are all longs) and a state/seed as a long.
|
static int |
hash64(long x,
long y,
long z,
long w,
long u,
long v,
long s)
Gets a 6-bit point hash of a 6D point (x, y, z, w, u, and v are all longs) and a state/seed as a long.
|
static long |
hashAll(long x,
long y,
long s)
Gets a 64-bit point hash of a 2D point (x and y are both longs) and a state/seed as a long.
|
static long |
hashAll(long x,
long y,
long z,
long s)
Gets a 64-bit point hash of a 3D point (x, y, and z are all longs) and a state/seed as a long.
|
static long |
hashAll(long x,
long y,
long z,
long w,
long s)
Gets a 64-bit point hash of a 4D point (x, y, z, and w are all longs) and a state/seed as a long.
|
static long |
hashAll(long x,
long y,
long z,
long w,
long u,
long s)
Gets a 64-bit point hash of a 5D point (x, y, z, w, and u are all longs) and a state/seed as a long.
|
static long |
hashAll(long x,
long y,
long z,
long w,
long u,
long v,
long s)
Gets a 64-bit point hash of a 6D point (x, y, z, w, u, and v are all longs) and a state/seed as a long.
|
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) |
public static final HappyPointHash INSTANCE
public HappyPointHash()
public HappyPointHash(int state)
public HappyPointHash(long state)
public int hashWithState(int x, int y, int state)
public int hashWithState(int x, int y, int z, int state)
public int hashWithState(int x, int y, int z, int w, int state)
public int hashWithState(int x, int y, int z, int w, int u, int state)
public int hashWithState(int x, int y, int z, int w, int u, int v, int state)
public long getState()
public static long hashAll(long x, long y, long s)
x
- x position; any longy
- y position; any longs
- the state/seed; any longpublic static long hashAll(long x, long y, long z, long s)
x
- x position; any longy
- y position; any longz
- z position; any longs
- the state/seed; any longpublic static long hashAll(long x, long y, long z, long w, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longs
- the state; any longpublic static long hashAll(long x, long y, long z, long w, long u, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longs
- the state; any longpublic static long hashAll(long x, long y, long z, long w, long u, long v, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longv
- v position; any longs
- the state; any longpublic static int hash256(long x, long y, long s)
x
- x position; any longy
- y position; any longs
- the state/seed; any longpublic static int hash256(long x, long y, long z, long s)
x
- x position; any longy
- y position; any longz
- z position; any longs
- the state/seed; any longpublic static int hash256(long x, long y, long z, long w, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longs
- the state; any longpublic static int hash256(long x, long y, long z, long w, long u, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longs
- the state; any longpublic static int hash256(long x, long y, long z, long w, long u, long v, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longv
- v position; any longs
- the state; any longpublic static int hash32(long x, long y, long s)
x
- x position; any longy
- y position; any longs
- the state/seed; any longpublic static int hash32(long x, long y, long z, long s)
x
- x position; any longy
- y position; any longz
- z position; any longs
- the state/seed; any longpublic static int hash32(long x, long y, long z, long w, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longs
- the state; any longpublic static int hash32(long x, long y, long z, long w, long u, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longs
- the state; any longpublic static int hash32(long x, long y, long z, long w, long u, long v, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longv
- v position; any longs
- the state; any longpublic static int hash64(long x, long y, long s)
x
- x position; any longy
- y position; any longs
- the state/seed; any longpublic static int hash64(long x, long y, long z, long s)
x
- x position; any longy
- y position; any longz
- z position; any longs
- the state/seed; any longpublic static int hash64(long x, long y, long z, long w, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longs
- the state; any longpublic static int hash64(long x, long y, long z, long w, long u, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longs
- the state; any longpublic static int hash64(long x, long y, long z, long w, long u, long v, long s)
x
- x position; any longy
- y position; any longz
- z position; any longw
- w position; any longu
- u position; any longv
- v position; any longs
- the state; any longCopyright © Eben Howard 2012–2022. All rights reserved.