Environment for
Supported by Index-Structures

Class Subspace.DimensionComparator

  extended by de.lmu.ifi.dbs.elki.data.Subspace.DimensionComparator
All Implemented Interfaces:
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.

Elke Achtert

Constructor Summary
Method Summary
 int compare(Subspace<?> s1, Subspace<?> s2)
          Compares the two specified subspaces for order.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator

Constructor Detail


public Subspace.DimensionComparator()
Method Detail


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<?>>

Release 0.3 (2010-03-31_1612)