Class CrossHash.Yolk
java.lang.Object
com.github.yellowstonegames.old.v300.CrossHash.Yolk
- Enclosing class:
CrossHash
Like Mist, this is a class for hash functors, each an object with a 64-bit long seed, but it uses about the same
algorithm as
CrossHash.Water instead of the older, less-robust style Mist uses. This can be faster than
CrossHash.Curlup, but only for small arrays as input (20 length or less); it tends to be slower on larger arrays,
though not by much, and should be the same for long[] since they share an implementation for that type.
Normally you should prefer Curlup if you know some or all of your arrays will be of moderate size or larger.
Has a lot of predefined functors (192, named after 24 Greek letters and 72 Goetic demons, see
Wikipedia for the demons,
in both lower case and lower case with a trailing underscore). You probably want to use predefined
instead of wrangling demon names; you can always choose an element from predefined with a 7-bit number, and there
are 64 numbers outside that range so you can choose any of those when a functor must be different.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolk[]Has a length of 192, which may be relevant if automatically choosing a predefined hash functor.static final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolklongstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolkstatic final CrossHash.Yolk -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninthash(boolean[] data) inthash(byte[] data) inthash(char[] data) inthash(char[][] data) inthash(char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).inthash(double[] data) inthash(float[] data) inthash(int[] data) inthash(int[][] data) inthash(int[] data, int length) inthash(long[] data) inthash(long[][] data) static inthash(long seed, boolean[] data) static inthash(long seed, byte[] data) static inthash(long seed, char[] data) static inthash(long seed, char[][] data) static inthash(long seed, char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).static inthash(long seed, double[] data) static inthash(long seed, float[] data) static inthash(long seed, int[] data) static inthash(long seed, int[][] data) static inthash(long seed, int[] data, int length) static inthash(long seed, long[] data) static inthash(long seed, long[][] data) static inthash(long seed, short[] data) static inthash(long seed, CharSequence data) static inthash(long seed, CharSequence[] data) static inthash(long seed, CharSequence[]... data) static inthash(long seed, CharSequence data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).static inthash(long seed, Iterable<? extends CharSequence> data) static intstatic intstatic inthash(long seed, List<? extends CharSequence> data) inthash(short[] data) inthash(CharSequence data) inthash(CharSequence[] data) inthash(CharSequence[]... data) inthash(CharSequence data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).inthash(Iterable<? extends CharSequence> data) intintinthash(List<? extends CharSequence> data) longhash64(boolean[] data) longhash64(byte[] data) longhash64(char[] data) longhash64(char[][] data) longhash64(char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).longhash64(double[] data) longhash64(float[] data) longhash64(int[] data) longhash64(int[][] data) longhash64(int[] data, int length) longhash64(long[] data) longhash64(long[][] data) static longhash64(long seed, boolean[] data) static longhash64(long seed, byte[] data) static longhash64(long seed, char[] data) static longhash64(long seed, char[][] data) static longhash64(long seed, char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).static longhash64(long seed, double[] data) static longhash64(long seed, float[] data) static longhash64(long seed, int[] data) static longhash64(long seed, int[][] data) static longhash64(long seed, int[] data, int length) static longhash64(long seed, long[] data) static longhash64(long seed, long[][] data) static longhash64(long seed, short[] data) static longhash64(long seed, CharSequence data) static longhash64(long seed, CharSequence[] data) static longhash64(long seed, CharSequence[]... data) static longhash64(long seed, CharSequence data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).static longhash64(long seed, Iterable<? extends CharSequence> data) static longstatic longstatic longhash64(long seed, List<? extends CharSequence> data) longhash64(short[] data) longhash64(CharSequence data) longhash64(CharSequence[] data) longhash64(CharSequence[]... data) longhash64(CharSequence data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).longhash64(Iterable<? extends CharSequence> data) longlonglonghash64(List<? extends CharSequence> data)
-
Field Details
-
seed
public long seed -
alpha
-
beta
-
gamma
-
delta
-
epsilon
-
zeta
-
eta
-
theta
-
iota
-
kappa
-
lambda
-
mu
-
nu
-
xi
-
omicron
-
pi
-
rho
-
sigma
-
tau
-
upsilon
-
phi
-
chi
-
psi
-
omega
-
alpha_
-
beta_
-
gamma_
-
delta_
-
epsilon_
-
zeta_
-
eta_
-
theta_
-
iota_
-
kappa_
-
lambda_
-
mu_
-
nu_
-
xi_
-
omicron_
-
pi_
-
rho_
-
sigma_
-
tau_
-
upsilon_
-
phi_
-
chi_
-
psi_
-
omega_
-
baal
-
agares
-
vassago
-
samigina
-
marbas
-
valefor
-
amon
-
barbatos
-
paimon
-
buer
-
gusion
-
sitri
-
beleth
-
leraje
-
eligos
-
zepar
-
botis
-
bathin
-
sallos
-
purson
-
marax
-
ipos
-
aim
-
naberius
-
glasya_labolas
-
bune
-
ronove
-
berith
-
astaroth
-
forneus
-
foras
-
asmoday
-
gaap
-
furfur
-
marchosias
-
stolas
-
phenex
-
halphas
-
malphas
-
raum
-
focalor
-
vepar
-
sabnock
-
shax
-
vine
-
bifrons
-
vual
-
haagenti
-
crocell
-
furcas
-
balam
-
alloces
-
caim
-
murmur
-
orobas
-
gremory
-
ose
-
amy
-
orias
-
vapula
-
zagan
-
valac
-
andras
-
flauros
-
andrealphus
-
kimaris
-
amdusias
-
belial
-
decarabia
-
seere
-
dantalion
-
andromalius
-
baal_
-
agares_
-
vassago_
-
samigina_
-
marbas_
-
valefor_
-
amon_
-
barbatos_
-
paimon_
-
buer_
-
gusion_
-
sitri_
-
beleth_
-
leraje_
-
eligos_
-
zepar_
-
botis_
-
bathin_
-
sallos_
-
purson_
-
marax_
-
ipos_
-
aim_
-
naberius_
-
glasya_labolas_
-
bune_
-
ronove_
-
berith_
-
astaroth_
-
forneus_
-
foras_
-
asmoday_
-
gaap_
-
furfur_
-
marchosias_
-
stolas_
-
phenex_
-
halphas_
-
malphas_
-
raum_
-
focalor_
-
vepar_
-
sabnock_
-
shax_
-
vine_
-
bifrons_
-
vual_
-
haagenti_
-
crocell_
-
furcas_
-
balam_
-
alloces_
-
caim_
-
murmur_
-
orobas_
-
gremory_
-
ose_
-
amy_
-
orias_
-
vapula_
-
zagan_
-
valac_
-
andras_
-
flauros_
-
andrealphus_
-
kimaris_
-
amdusias_
-
belial_
-
decarabia_
-
seere_
-
dantalion_
-
andromalius_
-
predefined
Has a length of 192, which may be relevant if automatically choosing a predefined hash functor.
-
-
Constructor Details
-
Yolk
public Yolk() -
Yolk
public Yolk(long seed) -
Yolk
-
-
Method Details
-
hash64
public long hash64(boolean[] data) -
hash64
public long hash64(byte[] data) -
hash64
public long hash64(short[] data) -
hash64
public long hash64(char[] data) -
hash64
-
hash64
public long hash64(int[] data) -
hash64
public long hash64(int[] data, int length) -
hash64
public long hash64(long[] data) -
hash64
public long hash64(float[] data) -
hash64
public long hash64(double[] data) -
hash64
public long hash64(char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the char array to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 64-bit hash code for the requested section of data
-
hash64
Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the String or other CharSequence to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 64-bit hash code for the requested section of data
-
hash64
public long hash64(char[][] data) -
hash64
public long hash64(int[][] data) -
hash64
public long hash64(long[][] data) -
hash64
-
hash64
-
hash64
-
hash64
-
hash64
-
hash64
-
hash
public int hash(boolean[] data) -
hash
public int hash(byte[] data) -
hash
public int hash(short[] data) -
hash
public int hash(char[] data) -
hash
-
hash
public int hash(int[] data) -
hash
public int hash(int[] data, int length) -
hash
public int hash(long[] data) -
hash
public int hash(float[] data) -
hash
public int hash(double[] data) -
hash
public int hash(char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the char array to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 32-bit hash code for the requested section of data
-
hash
Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the String or other CharSequence to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 32-bit hash code for the requested section of data
-
hash
public int hash(char[][] data) -
hash
public int hash(int[][] data) -
hash
public int hash(long[][] data) -
hash
-
hash
-
hash
-
hash
-
hash
-
hash
-
hash64
public static long hash64(long seed, boolean[] data) -
hash64
public static long hash64(long seed, byte[] data) -
hash64
public static long hash64(long seed, short[] data) -
hash64
public static long hash64(long seed, char[] data) -
hash64
-
hash64
public static long hash64(long seed, int[] data) -
hash64
public static long hash64(long seed, int[] data, int length) -
hash64
public static long hash64(long seed, long[] data) -
hash64
public static long hash64(long seed, float[] data) -
hash64
public static long hash64(long seed, double[] data) -
hash64
public static long hash64(long seed, char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the char array to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 32-bit hash code for the requested section of data
-
hash64
Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the String or other CharSequence to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 32-bit hash code for the requested section of data
-
hash64
public static long hash64(long seed, char[][] data) -
hash64
public static long hash64(long seed, int[][] data) -
hash64
public static long hash64(long seed, long[][] data) -
hash64
-
hash64
-
hash64
-
hash64
-
hash64
-
hash64
-
hash
public static int hash(long seed, boolean[] data) -
hash
public static int hash(long seed, byte[] data) -
hash
public static int hash(long seed, short[] data) -
hash
public static int hash(long seed, char[] data) -
hash
-
hash
public static int hash(long seed, int[] data) -
hash
public static int hash(long seed, int[] data, int length) -
hash
public static int hash(long seed, long[] data) -
hash
public static int hash(long seed, float[] data) -
hash
public static int hash(long seed, double[] data) -
hash
public static int hash(long seed, char[] data, int start, int end) Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the char array to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 32-bit hash code for the requested section of data
-
hash
Hashes only a subsection of the given data, starting at start (inclusive) and ending before end (exclusive).- Parameters:
data- the String or other CharSequence to hashstart- the start of the section to hash (inclusive)end- the end of the section to hash (exclusive)- Returns:
- a 32-bit hash code for the requested section of data
-
hash
public static int hash(long seed, char[][] data) -
hash
public static int hash(long seed, int[][] data) -
hash
public static int hash(long seed, long[][] data) -
hash
-
hash
-
hash
-
hash
-
hash
-
hash
-