Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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>
All Implemented Interfaces:
Iterator<Pair<D,Integer>>
Enclosing class:
ROC

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

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!

Author:
Erich Schubert

Field Summary
private  Iterator<DistanceResultPair<D>> iter
          Original Iterator
 
Constructor Summary
ROC.DistanceResultAdapter(Iterator<DistanceResultPair<D>> iter)
          Constructor
 
Method Summary
 boolean hasNext()
           
 Pair<D,Integer> 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 -
Method Detail

hasNext

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

next

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

remove

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

Release 0.2 (2009-07-06_1820)