de.lmu.ifi.dbs.elki.data
Class Subspace.DimensionComparator
java.lang.Object
de.lmu.ifi.dbs.elki.data.Subspace.DimensionComparator
- All Implemented Interfaces:
- Comparator<Subspace<?>>
- Enclosing class:
- Subspace<V extends FeatureVector<V,?>>
public static class Subspace.DimensionComparator
- extends Object
- implements Comparator<Subspace<?>>
A comparator for subspaces based on their involved dimensions. The
subspaces are ordered according to the ordering of their dimensions.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Subspace.DimensionComparator
public Subspace.DimensionComparator()
compare
public int compare(Subspace<?> s1,
Subspace<?> s2)
- Compares the two specified subspaces for order. If the two subspaces have
different dimensionalities a negative integer or a positive integer will
be returned if the dimensionality of the first subspace is less than or
greater than the dimensionality of the second subspace. Otherwise the
comparison works as follows: Let
d1
and d2
be the first
occurrences of pairwise unequal dimensions in the specified subspaces.
Then a negative integer or a positive integer will be returned if d1
is less than or greater than d2
. Otherwise the two subspaces
have equal dimensions and zero will be returned.
- Specified by:
compare
in interface Comparator<Subspace<?>>