E - the type of elements contained in the listspublic interface ListDistance<E> extends Distance<List<E>>
The elements in the lists have to implement Object.hashCode() and
Object.equals(Object).
The distance measure should be consistent with equals such that
a.equals(b) => distance(a,b) == 0.0.
The similarity measure should be reflexive such that
distance(a,a) == 0.0.
The similarity measure should be symmetric such that
distance(a,b) == distance(b,a).
Implementations may not modify the contents of the list. List should be
treated as if wrapped by Collections.unmodifiableList(List).
| Modifier and Type | Method and Description |
|---|---|
float |
distance(List<E> a,
List<E> b)
Measures the distance between lists a and b.
|
float distance(List<E> a, List<E> b)
0.0 indicates that a and
b are similar.distance in interface Distance<List<E>>a - list a to compareb - list b to compareNullPointerException - when either a or b is nullCopyright © 2014–2018. All rights reserved.