public class HammingDistance extends Object implements IDistanceFunction<int[]>
Constructor and Description |
---|
HammingDistance() |
Modifier and Type | Method and Description |
---|---|
float |
getDistance(int[] object1,
int[] object2)
Distance should be large if objects are "far away" from each other, i.e.
|
float |
getNativeComparison(int[] object1,
int[] object2)
Count only nonzero items
|
public float getDistance(int[] object1, int[] object2) throws Exception
IDistanceFunction
getDistance
in interface IDistanceFunction<int[]>
Exception
public float getNativeComparison(int[] object1, int[] object2) throws Exception
getNativeComparison
in interface IDistanceFunction<int[]>
Exception
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.