gov.sandia.cognition.math.geometry
Class KDTree.Neighborhood.Neighbor<VectorType extends Vectorizable,DataType,PairType extends Pair<? extends VectorType,DataType>>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.math.geometry.KDTree.Neighborhood.Neighbor<VectorType,DataType,PairType>
Type Parameters:
VectorType - Type of Vectorizable, the first values
DataType - Type of data in the Pair, the second values
PairType - Type of Pair to use in the KDTree.
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable, Comparable<KDTree.Neighborhood.Neighbor<VectorType,DataType,PairType>>
Enclosing class:
KDTree.Neighborhood<VectorType extends Vectorizable,DataType,PairType extends Pair<? extends VectorType,DataType>>

protected class KDTree.Neighborhood.Neighbor<VectorType extends Vectorizable,DataType,PairType extends Pair<? extends VectorType,DataType>>
extends AbstractCloneableSerializable
implements Comparable<KDTree.Neighborhood.Neighbor<VectorType,DataType,PairType>>

Holds neighbor information used during the evaluate method and is put into a priority queue.

See Also:
Serialized Form

Constructor Summary
KDTree.Neighborhood.Neighbor(PairType value, double distance)
          Creates a new neighbor.
 
Method Summary
 int compareTo(KDTree.Neighborhood.Neighbor<VectorType,DataType,PairType> other)
           
 boolean equals(Object obj)
           
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KDTree.Neighborhood.Neighbor

public KDTree.Neighborhood.Neighbor(PairType value,
                                    double distance)
Creates a new neighbor.

Parameters:
value - The value associated with the neighbor.
distance - Distance associated with this value.
Method Detail

compareTo

public int compareTo(KDTree.Neighborhood.Neighbor<VectorType,DataType,PairType> other)
Specified by:
compareTo in interface Comparable<KDTree.Neighborhood.Neighbor<VectorType extends Vectorizable,DataType,PairType extends Pair<? extends VectorType,DataType>>>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object