|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.geom.comp.Hamming
public final class Hamming
This class is used to compute Hamming distances - the number of differences between two "strings" of equal length.
Constructor Summary | |
---|---|
Hamming()
|
Method Summary | |
---|---|
int |
getDist(java.util.Collection<?> x,
java.util.Collection<?> y)
Computes and returns the Hamming distance between the provided collections. |
int |
getDist(java.util.Map<?,?> x,
java.util.Map<?,?> y)
Computes and returns the Hamming distance between the provided maps. |
int |
getDist(java.lang.Object[] x,
java.lang.Object[] y)
Computes and returns the Hamming distance between the provided arrays. |
int |
getDist(java.lang.String x,
java.lang.String y)
Computes and returns the Hamming distance between the provided strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Hamming()
Method Detail |
---|
public int getDist(java.lang.String x, java.lang.String y)
x
- a string.y
- another string.
java.lang.IllegalArgumentException
- if the lengths of the provided strings
are not equal.public int getDist(java.lang.Object[] x, java.lang.Object[] y)
equals()
method.
x
- an array of objects.y
- another array of objects.
java.lang.IllegalArgumentException
- if the lengths of the provided arrays
are not equal.public int getDist(java.util.Collection<?> x, java.util.Collection<?> y)
equals()
method upon iteration
over each collection.
x
- a collection of objects.y
- another collection of objects.
java.lang.IllegalArgumentException
- if the lengths of the provided collections
are not equal.public int getDist(java.util.Map<?,?> x, java.util.Map<?,?> y)
equals()
method.
x
- a map.y
- another map.
java.lang.IllegalArgumentException
- if the lengths of the provided maps
or the key sets are not equal.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |