org.decisiondeck.jmcda.services.sorting.assignments
Class CredibilitiesHelper

java.lang.Object
  extended by org.decisiondeck.jmcda.services.sorting.assignments.CredibilitiesHelper

public class CredibilitiesHelper
extends Object

Computes statistics pertaining to an IOrderedAssignmentsWithCredibilitiesRead object.


Constructor Summary
CredibilitiesHelper()
           
 
Method Summary
 boolean computed()
           
 void computeStatistics(IOrderedAssignmentsWithCredibilitiesRead assignments)
          Computes the statistics: finds the maximal credibility value; the maximal sum on the set of assigned alternatives; the minimal difference between two credibility values.
 double getMaxSum()
           Statistics must have been computed.
 double getMaxValue()
           Statistics must have been computed.
 Double getMinDiff()
           Statistics must have been computed.
 double getMinMaxValue()
           
 double getMinSum()
           Statistics must have been computed.
 double getMinValue()
           Statistics must have been computed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredibilitiesHelper

public CredibilitiesHelper()
Method Detail

getMaxSum

public double getMaxSum()

Statistics must have been computed.

Retrieves the greatest sum of credibilities over the set of assigned alternatives.

Returns:
a number positive and non zero.

getMaxValue

public double getMaxValue()

Statistics must have been computed.

Retrieves the maximal credibility value found.

Returns:
a number positive and non zero.

getMinDiff

public Double getMinDiff()

Statistics must have been computed.

Retrieves the minimal difference between two credibility values.

Returns:
a number positive and non zero, or null iff all credibility values are equal.

computeStatistics

public void computeStatistics(IOrderedAssignmentsWithCredibilitiesRead assignments)
Computes the statistics: finds the maximal credibility value; the maximal sum on the set of assigned alternatives; the minimal difference between two credibility values. The minimal difference exists iff there is at least two different values in the given assignments, equivalently, the minimal difference is not defined iff the given assignments use only one value as credibilities, e.g., it consists of only one assigned alternative which has credibility (3, 3). The credibility values are all positive and non zero, as usual, thus so is also the maximal sum and the maximal value. The minimal difference is positive and non zero as well.

Parameters:
assignments - not null, must contain at least one assignment.

getMinMaxValue

public double getMinMaxValue()
Returns:
the minimal credibility value over the set of assigned alternatives, of the highest credibility value for that alternative.

computed

public boolean computed()
Returns:
true iff the statistics have been computed.

getMinSum

public double getMinSum()

Statistics must have been computed.

Retrieves the smallest sum of credibilities over the set of assigned alternatives.

Returns:
a number positive and non zero.

getMinValue

public double getMinValue()

Statistics must have been computed.

Retrieves the minimal credibility value found.

Returns:
a number greater than zero.


Copyright © 2011. All Rights Reserved.