public class TorusCachePointHash extends IPointHash.IntImpl
IPointHash.IntImpl, IPointHash.LongImpl
Modifier and Type | Field and Description |
---|---|
protected int[] |
cache |
protected int |
wrap |
state
Constructor and Description |
---|
TorusCachePointHash() |
TorusCachePointHash(int state) |
TorusCachePointHash(int state,
int wrapAt) |
Modifier and Type | Method and Description |
---|---|
static int |
determineInt(int x)
Thomas Wang's 2002 integer hash.
|
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) |
void |
setState(int state) |
void |
setState(long state) |
public TorusCachePointHash()
public TorusCachePointHash(int state)
public TorusCachePointHash(int state, int wrapAt)
public void setState(int state)
setState
in interface IPointHash
setState
in class IPointHash.IntImpl
public void setState(long state)
setState
in interface IPointHash
setState
in class IPointHash.IntImpl
public static int determineInt(int x)
x
- any intpublic 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)
Copyright © Eben Howard 2012–2022. All rights reserved.