public class HammingUtils extends Object
Constructor and Description |
---|
HammingUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
packedHamming(byte i1,
byte i2)
Bitwise (assuming packed bit strings) hamming distance
|
static int |
packedHamming(char i1,
char i2)
Bitwise (assuming packed bit strings) hamming distance
|
static int |
packedHamming(double i1,
double i2)
Bitwise (assuming packed bit strings) hamming distance
|
static int |
packedHamming(float i1,
float i2)
Bitwise (assuming packed bit strings) hamming distance
|
static int |
packedHamming(int i1,
int i2)
Bitwise (assuming packed bit strings) hamming distance
|
static int |
packedHamming(long i1,
long i2)
Bitwise (assuming packed bit strings) hamming distance
|
static int |
packedHamming(short i1,
short i2)
Bitwise (assuming packed bit strings) hamming distance
|
static byte |
unpackByte(String bits)
Unpack a binary string ("10011...") into a byte
|
static double |
unpackDouble(String bits)
Unpack a binary string ("10011...") into a double
|
static float |
unpackFloat(String bits)
Unpack a binary string ("10011...") into a float
|
static int |
unpackInt(String bits)
Unpack a binary string ("10011...") into an int
|
static long |
unpackLong(String bits)
Unpack a binary string ("10011...") into a long
|
static short |
unpackShort(String bits)
Unpack a binary string ("10011...") into a short
|
public HammingUtils()
public static int packedHamming(double i1, double i2)
i1
- first bit stringi2
- second bit stringpublic static int packedHamming(float i1, float i2)
i1
- first bit stringi2
- second bit stringpublic static int packedHamming(long i1, long i2)
i1
- first bit stringi2
- second bit stringpublic static int packedHamming(int i1, int i2)
i1
- first bit stringi2
- second bit stringpublic static int packedHamming(byte i1, byte i2)
i1
- first bit stringi2
- second bit stringpublic static int packedHamming(char i1, char i2)
i1
- first bit stringi2
- second bit stringpublic static int packedHamming(short i1, short i2)
i1
- first bit stringi2
- second bit stringpublic static double unpackDouble(String bits)
bits
- public static float unpackFloat(String bits)
bits
- public static int unpackInt(String bits)
bits
- public static long unpackLong(String bits)
bits
- public static short unpackShort(String bits)
bits
- public static byte unpackByte(String bits)
bits
-