de.lmu.ifi.dbs.elki.evaluation.roc
Class ROC.DistanceResultAdapter<D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.evaluation.roc.ROC.DistanceResultAdapter<D>
Type Parameters:
D - Distance type
All Implemented Interfaces:
Iterator<Pair<D,DBID>>
Enclosing class:
ROC

public static class ROC.DistanceResultAdapter<D extends Distance<D>>
extends Object
implements Iterator<Pair<D,DBID>>

This adapter can be used for an arbitrary collection of Integers, and uses that id1.compareTo(id2) != 0 for id1 != id2 to satisfy the comparability. Note that of course, no id should occur more than once. The ROC values would be incorrect then anyway!


Field Summary
private  Iterator<DistanceResultPair<D>> iter
          Original Iterator
 
Constructor Summary
ROC.DistanceResultAdapter(Iterator<DistanceResultPair<D>> iter)
          Constructor
 
Method Summary
 boolean hasNext()
           
 Pair<D,DBID> next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iter

private Iterator<DistanceResultPair<D extends Distance<D>>> iter
Original Iterator

Constructor Detail

ROC.DistanceResultAdapter

public ROC.DistanceResultAdapter(Iterator<DistanceResultPair<D>> iter)
Constructor

Parameters:
iter - Iterator for distance results
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Pair<D extends Distance<D>,DBID>>

next

public Pair<D,DBID> next()
Specified by:
next in interface Iterator<Pair<D extends Distance<D>,DBID>>

remove

public void remove()
Specified by:
remove in interface Iterator<Pair<D extends Distance<D>,DBID>>

Release 0.4.0 (2011-09-20_1324)