de.lmu.ifi.dbs.elki.data
Class Subspace.DimensionComparator

java.lang.Object
  extended by 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.


Constructor Summary
Subspace.DimensionComparator()
           
 
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
equals
 

Constructor Detail

Subspace.DimensionComparator

public Subspace.DimensionComparator()
Method Detail

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

Release 0.4.0 (2011-09-20_1324)