org.decisiondeck.xmcda_oo.utils
Class EvaluationsStatistics

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.utils.EvaluationsStatistics

public class EvaluationsStatistics
extends Object

An object that contains statistics about evaluations. Immutable.

Note that if the evaluations bound to this object change, the statistics do not change and thus become invalid.


Constructor Summary
EvaluationsStatistics(IRdEvaluations evaluations)
          Computes statistics about the given evaluations.
 
Method Summary
 double getAntiIdeal(Criterion criterion, Criterion.PreferenceDirection preferenceDirection)
           Finds the worst evaluation in the bound evaluations on the given criterion when the statistics were computed, i.e., the smallest if the criterion is to be maximized, the highest if it should be minimal.
 Set<Criterion> getCriteria()
          Retrieves a copy, or read-only view, of the criteria for which statistics are available.
 double getIdeal(Criterion criterion, Criterion.PreferenceDirection direction)
           Finds the best evaluation that existed in the bound evaluations on the given criterion when the statistics were computed, i.e., the highest if the criterion is to be maximized, the smallest if it should be minimal.
 double getMaxDifference(Criterion criterion)
           Finds the maximal evaluation difference in the given matrix on the given criterion, i.e., the highest difference between any two evaluations on the given criterion.
 double getMaximum(Criterion criterion)
           Finds the highest evaluation that existed in the bound evaluations on the given criterion when the statistics were computed.
 Double getMinDifference(Criterion criterion)
           Finds the minimal evaluation difference in the given matrix on the given criterion, i.e., the smallest difference between any two different evaluation values on the given criterion.
 double getMinimum(Criterion criterion)
           Finds the lowest evaluation that existed in the bound evaluations on the given criterion when the statistics were computed.
 NavigableSet<Double> getSortedEvaluations(Criterion criterion)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluationsStatistics

public EvaluationsStatistics(IRdEvaluations evaluations)
Computes statistics about the given evaluations.

Parameters:
evaluations - not null.
Method Detail

getCriteria

public Set<Criterion> getCriteria()
Retrieves a copy, or read-only view, of the criteria for which statistics are available.

Returns:
not null.

getSortedEvaluations

public NavigableSet<Double> getSortedEvaluations(Criterion criterion)

getAntiIdeal

public double getAntiIdeal(Criterion criterion,
                           Criterion.PreferenceDirection preferenceDirection)

Finds the worst evaluation in the bound evaluations on the given criterion when the statistics were computed, i.e., the smallest if the criterion is to be maximized, the highest if it should be minimal.

Parameters:
criterion - the criterion to find the anti-ideal for. Must have a preference direction. Must be in this object.
Returns:
the worst (highest or smallest) evaluation on the given criterion.

getMinimum

public double getMinimum(Criterion criterion)

Finds the lowest evaluation that existed in the bound evaluations on the given criterion when the statistics were computed.

Parameters:
criterion - not null, must be in this object.
Returns:
the lowest evaluation on the given criterion.

getMaxDifference

public double getMaxDifference(Criterion criterion)

Finds the maximal evaluation difference in the given matrix on the given criterion, i.e., the highest difference between any two evaluations on the given criterion.

Parameters:
criterion - the criterion to find the maximal difference for. Must be in this object.
Returns:
the maximal difference on the given criterion (strictly positive), and zero if all evaluations on the given criterion are identical.

getMinDifference

public Double getMinDifference(Criterion criterion)

Finds the minimal evaluation difference in the given matrix on the given criterion, i.e., the smallest difference between any two different evaluation values on the given criterion.

Parameters:
criterion - the criterion to find the minimal difference for. Must be in this object.
Returns:
the minimal difference on the given criterion (strictly positive), or null iff all evaluations on the given criterion are identical.

getIdeal

public double getIdeal(Criterion criterion,
                       Criterion.PreferenceDirection direction)

Finds the best evaluation that existed in the bound evaluations on the given criterion when the statistics were computed, i.e., the highest if the criterion is to be maximized, the smallest if it should be minimal.

Parameters:
criterion - the criterion to find the ideal for. Must have a preference direction. Must be in this object.
Returns:
the best (highest or smallest) evaluation on the given criterion.

getMaximum

public double getMaximum(Criterion criterion)

Finds the highest evaluation that existed in the bound evaluations on the given criterion when the statistics were computed.

Parameters:
criterion - not null, must be in this object.
Returns:
the highest evaluation on the given criterion.


Copyright © 2011. All Rights Reserved.