|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.xmcda_oo.utils.CompareByDominance
public class CompareByDominance
This comparator must be bound to a set of criteria and to evaluations and compares the given alternatives by their dominance relations (the dominated one is inferior to the dominating one). This comparator must be only given alternatives which dominate each other, or which have exactly the same performance.
No thresholds or other subtleties are considered: a better numerical performance on a given criterion is considered to imply that the alternative is better.
This object (beyond its possible usage as a comparator) may also tell if a given set of alternatives is in dominance relation.
| Constructor Summary | |
|---|---|
CompareByDominance(Set<Criterion> criteria,
IRdEvaluations evaluations)
|
|
| Method Summary | |
|---|---|
int |
compare(Alternative a1,
Alternative a2)
|
int |
compare(Alternative a1,
Alternative a2,
Criterion crit)
|
int |
compare2(Alternative a1,
Alternative a2)
As compare(Alternative, Alternative), but throws an exception if some required data is missing. |
ComparisonRelation |
getRelation(Alternative a1,
Alternative a2)
Returns the relation characterizing the comparison between the two given alternatives. |
boolean |
isDominance(Set<Alternative> alternatives)
Indicates whether all these alternatives may be ordered according to the dominance relation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public CompareByDominance(Set<Criterion> criteria,
IRdEvaluations evaluations)
criteria - the criteria to use in the comparison. The preference directions must be provided.evaluations - the evaluations. All evaluations for the alternatives that will be compared on all the relevant
criteria must be provided.| Method Detail |
|---|
public int compare(Alternative a1,
Alternative a2)
compare in interface Comparator<Alternative>
public int compare2(Alternative a1,
Alternative a2)
throws InvalidInputException
compare(Alternative, Alternative), but throws an exception if some required data is missing.
a1 - an alternative.a2 - an other one.
InvalidInputException - iff some data is missing (e.g. a required evaluation).
public int compare(Alternative a1,
Alternative a2,
Criterion crit)
throws InvalidInputException
InvalidInputException
public boolean isDominance(Set<Alternative> alternatives)
throws InvalidInputException
alternatives - not null. The alternatives to consider.
true iff each pair of alternatives in the given set is such that either they are equal (they
have exactly the same evaluations on all the criteria to consider), or one dominates the other one.
InvalidInputException - if some missing information renders the check impossible (e.g. an evaluation is missing).
public ComparisonRelation getRelation(Alternative a1,
Alternative a2)
throws InvalidInputException
a1 - the first alternative.a2 - the alternative to compare it to.
InvalidInputException - iff some information is missing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||