gov.sandia.cognition.math.geometry
Class KDTree.PairFirstVectorizableIndexComparator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.math.geometry.KDTree.PairFirstVectorizableIndexComparator
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable, Comparator<Pair<? extends Vectorizable,?>>
Enclosing class:
KDTree<VectorType extends Vectorizable,DataType,PairType extends Pair<? extends VectorType,DataType>>

protected static class KDTree.PairFirstVectorizableIndexComparator
extends AbstractCloneableSerializable
implements Comparator<Pair<? extends Vectorizable,?>>

Comparator for Pairs that have a Vectorizable as its first parameter.

See Also:
Serialized Form

Field Summary
 VectorizableIndexComparator comparator
          Embedded comparator for the Vectorizable argument.
 
Constructor Summary
KDTree.PairFirstVectorizableIndexComparator(int index)
          Creates a new instance of PairFirstVectorizableIndexComparator
 
Method Summary
 int compare(Pair<? extends Vectorizable,?> o1, Pair<? extends Vectorizable,?> o2)
           
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

comparator

public VectorizableIndexComparator comparator
Embedded comparator for the Vectorizable argument.

Constructor Detail

KDTree.PairFirstVectorizableIndexComparator

public KDTree.PairFirstVectorizableIndexComparator(int index)
Creates a new instance of PairFirstVectorizableIndexComparator

Parameters:
index - Index of the Vectorizable to compare against.
Method Detail

compare

public int compare(Pair<? extends Vectorizable,?> o1,
                   Pair<? extends Vectorizable,?> o2)
Specified by:
compare in interface Comparator<Pair<? extends Vectorizable,?>>