Distance

Inheritance: java.lang.Object

public class Distance

Constructors

Constructor Description
Distance()

Methods

Method Description
bitwiseHamming(byte[] x, byte[] y)
bitwiseHamming(int x, int y)
convolutionMetric(List hypothesis, List standard, int penalty) A metric of hypByteBlock and byteBlock
equals(Object arg0)
getClass()
hamming(byte[] x, byte[] y)
hammingDistance(List bytes1, List bytes2, int blockLength) Hamming distance of bytes1 and bytes 2
hashCode()
levenshtein(String x, String y)
levenshteinMax255(byte[] x, byte[] y)
notify()
notifyAll()
taxicabDistanceX(ByteBitmap byteBitmap, int x1, int x2) Calculates taxicab distance between x1 and x2 levels (Hamming 1d = taxicab distance)
taxicabDistanceY(ByteBitmap byteBitmap, int y1, int y2) Calculates taxicab distance between y1 and y2 levels (Hamming 1d = taxicab distance)
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

Distance()

public Distance()

bitwiseHamming(byte[] x, byte[] y)

public static int bitwiseHamming(byte[] x, byte[] y)

Parameters:

Parameter Type Description
x byte[]
y byte[]

Returns: int

bitwiseHamming(int x, int y)

public static int bitwiseHamming(int x, int y)

Parameters:

Parameter Type Description
x int
y int

Returns: int

convolutionMetric(List hypothesis, List standard, int penalty)

public static int convolutionMetric(List<Byte> hypothesis, List<Byte> standard, int penalty)

A metric of hypByteBlock and byteBlock

Parameters:

Parameter Type Description
hypothesis java.util.List<java.lang.Byte> Hypotesis byte block
standard java.util.List<java.lang.Byte> Byte block
penalty int Incorrect bytes coefficient

Returns: int - A metric of hypByteBlock and byteBlock

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hamming(byte[] x, byte[] y)

public static int hamming(byte[] x, byte[] y)

Parameters:

Parameter Type Description
x byte[]
y byte[]

Returns: int

hammingDistance(List bytes1, List bytes2, int blockLength)

public static int hammingDistance(List<Byte> bytes1, List<Byte> bytes2, int blockLength)

Hamming distance of bytes1 and bytes 2

Parameters:

Parameter Type Description
bytes1 java.util.List<java.lang.Byte> first list of bytes
bytes2 java.util.List<java.lang.Byte> second list of bytes
blockLength int The length of the block to calculate Hamming distance on this from 0 to blockLength

Returns: int - Hamming distance

hashCode()

public native int hashCode()

Returns: int

levenshtein(String x, String y)

public static int levenshtein(String x, String y)

Parameters:

Parameter Type Description
x java.lang.String
y java.lang.String

Returns: int

levenshteinMax255(byte[] x, byte[] y)

public static int levenshteinMax255(byte[] x, byte[] y)

Parameters:

Parameter Type Description
x byte[]
y byte[]

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

taxicabDistanceX(ByteBitmap byteBitmap, int x1, int x2)

public static int taxicabDistanceX(ByteBitmap byteBitmap, int x1, int x2)

Calculates taxicab distance between x1 and x2 levels (Hamming 1d = taxicab distance)

Parameters:

Parameter Type Description
byteBitmap ByteBitmap byte bitmap
x1 int first x-coordinate
x2 int second x-coordinate

Returns: int - taxicab distance (1d)

taxicabDistanceY(ByteBitmap byteBitmap, int y1, int y2)

public static int taxicabDistanceY(ByteBitmap byteBitmap, int y1, int y2)

Calculates taxicab distance between y1 and y2 levels (Hamming 1d = taxicab distance)

Parameters:

Parameter Type Description
byteBitmap ByteBitmap byte bitmap
y1 int first y-coordinate
y2 int second y-coordinate

Returns: int - taxicab distance (1d)

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int