org.decisiondeck.xmcda_oo.structure
Interface IOrderedInterval

All Known Implementing Classes:
DiscreteOrderedInterval, IntegerStepScaleToDel, OrderedInterval

public interface IOrderedInterval

Represents an interval on the set of real numbers, ordered if the preference direction is set. This is not mandatory. The interval may end at infinity, thus the interval may also represent the whole set of reals.

The interval may be discrete in which case a step size s is defined and the minimum m must be non infinite. The set of number this represents, supposing the maximum of this interval is infinite, is m+k*s with k a positive integer or zero. If the maximum of this interval is defined as a real number M, thus if it is not infinite, the set of numbers represented by this interval is m+k*s with k ≥ 0 and m+k*s ≤ M.

When associated with a criterion, such an interval is typically called a scale and represents the set of numbers an evaluation of an alternative over that criterion must belong to. Except indicated otherwise, saying that a scale is defined for a given criterion means that it has such an interval associated with it, but not necessarily that the preference direction of this interval is defined. Therefore, saying that a scale is defined does not imply that the criterion is indeed associated with an ordered interval, only that it is associated with an interval.


Method Summary
 DiscreteOrderedInterval getAsDiscreteInterval()
           This interval must have a step size.
 double getBest()
           The preference direction must be set.
 int getDirectionAsSign()
           The preference direction must be set.
 double getMaximum()
          Retrieves the maximum value included in this interval, or positive infinity.
 double getMinimum()
          Retrieves the minimum value included in this interval, or negative infinity.
 Criterion.PreferenceDirection getPreferenceDirection()
          Retrieves the preference direction associated to this interval.
 Double getStepSize()
          Retrieves the step size bound to this interval, or null if no step size is defined.
 double getWorst()
           The preference direction must be set.
 

Method Detail

getAsDiscreteInterval

DiscreteOrderedInterval getAsDiscreteInterval()

This interval must have a step size.

Retrieves a facade permitting easier usage of this interval when it represents a discrete interval.

Returns:
not null.

getBest

double getBest()

The preference direction must be set.

Retrieves the maximum value if the preference direction is to maximize, the minimum value if the preference direction is to minimize. If the corresponding bound is not set this method returns a positive or negative infinity.

Returns:
infinity or a real number.

getDirectionAsSign

int getDirectionAsSign()

The preference direction must be set.

Useful for computations depending on the preference direction associated with this interval.

Returns:
1 if the preference direction is to maximize, -1 if it is to minimize.

getMaximum

double getMaximum()
Retrieves the maximum value included in this interval, or positive infinity. The returned value is necessarily greater than or equal to getMinimum().

Returns:
Double.POSITIVE_INFINITY or a real number.

getMinimum

double getMinimum()
Retrieves the minimum value included in this interval, or negative infinity. The returned value is necessarily smaller than or equal to getMaximum().

Returns:
Double.NEGATIVE_INFINITY or a real number.

getPreferenceDirection

Criterion.PreferenceDirection getPreferenceDirection()
Retrieves the preference direction associated to this interval.

Returns:
null for not set.

getStepSize

Double getStepSize()
Retrieves the step size bound to this interval, or null if no step size is defined. If the step size is defined, the minimum of this interval is a real, thus non-infinite, number.

Returns:
null for no step size, or a number greater than zero.

getWorst

double getWorst()

The preference direction must be set.

Retrieves the minimum value if the preference direction is to maximize, the maximum value if the preference direction is to minimize. If the corresponding bound is not set this method returns a positive or negative infinity.

Returns:
infinity or a real number.


Copyright © 2011. All Rights Reserved.