weka.classifiers.meta.multisearch
Class PerformanceComparator

java.lang.Object
  extended by weka.classifiers.meta.multisearch.PerformanceComparator
All Implemented Interfaces:
Serializable, Comparator<Performance>

public class PerformanceComparator
extends Object
implements Comparator<Performance>, Serializable

A concrete Comparator for the Performance class.

Version:
$Revision: 4521 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Performance, Serialized Form

Field Summary
protected  int m_Evaluation
          the performance measure to use for comparison.
 
Constructor Summary
PerformanceComparator(int evaluation)
          initializes the comparator with the given performance measure.
 
Method Summary
 int compare(Performance o1, Performance o2)
          Compares its two arguments for order.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this Comparator.
 int getEvaluation()
          returns the performance measure that's used to compare the objects.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Evaluation

protected int m_Evaluation
the performance measure to use for comparison.

See Also:
MultiSearch.TAGS_EVALUATION
Constructor Detail

PerformanceComparator

public PerformanceComparator(int evaluation)
initializes the comparator with the given performance measure.

Parameters:
evaluation - the performance measure to use
See Also:
MultiSearch.TAGS_EVALUATION
Method Detail

getEvaluation

public int getEvaluation()
returns the performance measure that's used to compare the objects.

Returns:
the performance measure
See Also:
MultiSearch.TAGS_EVALUATION

compare

public int compare(Performance o1,
                   Performance o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface Comparator<Performance>
Parameters:
o1 - the first performance
o2 - the second performance
Returns:
the order

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this Comparator.

Specified by:
equals in interface Comparator<Performance>
Overrides:
equals in class Object
Parameters:
obj - the object to compare with
Returns:
true if the same evaluation type is used


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.