gov.sandia.cognition.statistics.method
Class ReceiverOperatingCharacteristic.DataPoint.Sorter

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.ReceiverOperatingCharacteristic.DataPoint.Sorter
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable, Comparator<ReceiverOperatingCharacteristic.DataPoint>
Enclosing class:
ReceiverOperatingCharacteristic.DataPoint

public static class ReceiverOperatingCharacteristic.DataPoint.Sorter
extends AbstractCloneableSerializable
implements Comparator<ReceiverOperatingCharacteristic.DataPoint>

Sorts DataPoints in ascending order according to their falsePositiveRate (x-axis)

See Also:
Serialized Form

Constructor Summary
ReceiverOperatingCharacteristic.DataPoint.Sorter()
           
 
Method Summary
 int compare(ReceiverOperatingCharacteristic.DataPoint o1, ReceiverOperatingCharacteristic.DataPoint o2)
          Sorts ROCDataPoints in ascending order according to their falsePositiveRate (x-axis), used in Arrays.sort() method
 
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
 

Constructor Detail

ReceiverOperatingCharacteristic.DataPoint.Sorter

public ReceiverOperatingCharacteristic.DataPoint.Sorter()
Method Detail

compare

public int compare(ReceiverOperatingCharacteristic.DataPoint o1,
                   ReceiverOperatingCharacteristic.DataPoint o2)
Sorts ROCDataPoints in ascending order according to their falsePositiveRate (x-axis), used in Arrays.sort() method

Specified by:
compare in interface Comparator<ReceiverOperatingCharacteristic.DataPoint>
Parameters:
o1 - First datapoint
o2 - Second datapoint
Returns:
-1 if o1o2, 0 if o1=o2