|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICoalitions
A set of weights (bound to criteria) and a majority threshold. The weights and the majority threshold are not requested to be between 0 and 1 (that would be restrictive as some users may which to use non normalized weights). They must however be positive or zero. This represent criteria satisfying coalitions (or sometimes winning coalitions), where a coalition is a set of criteria whose sum of weight is at least the majority threshold.
| Method Summary | |
|---|---|
boolean |
approxEquals(ICoalitions c2,
double tolerance)
|
Set<Criterion> |
getCriteria()
Retrieves a read-only view of the set of criteria on which weights are defined. |
Double |
getMajorityThreshold()
|
Double |
getNormalizedWeight(Criterion criterion)
|
Weights |
getNormalizedWeights()
TODO talk about tolerance (through weights); provide a r-o view. |
Double |
getWeight(Criterion criterion)
|
Weights |
getWeights()
Retrieves a view that reads and writes through to this object. |
boolean |
isEmpty()
Tests whether this object contains no information. |
boolean |
isNormalized()
|
Double |
putWeight(Criterion criterion,
double weight)
Sets or replaces the weight associated to the given criterion. |
Double |
removeMajorityThreshold()
Removes the possibly associated majority threshold. |
Double |
setMajorityThreshold(double majorityThreshold)
Sets or replaces the majority threshold. |
void |
setWeight(Criterion criterion,
Double weight)
Sets or remove the weight associated to the given criterion. |
| Method Detail |
|---|
Set<Criterion> getCriteria()
null.Double getMajorityThreshold()
null iff no threshold. Otherwise, a positive or zero value.Double getWeight(Criterion criterion)
criterion - not null.
null if the given
criterion is unknown.
void setWeight(Criterion criterion,
Double weight)
criterion - not null.weight - a positive or zero value, or null to remove it.
Double putWeight(Criterion criterion,
double weight)
criterion - not null.weight - a positive or zero value.
null if
it was unknown.Double setMajorityThreshold(double majorityThreshold)
majorityThreshold - a positive or zero value.
null iff it was not set.Double removeMajorityThreshold()
null iff it was not set.boolean isNormalized()
Weights getWeights()
null.Double getNormalizedWeight(Criterion criterion)
Weights getNormalizedWeights()
null.
boolean approxEquals(ICoalitions c2,
double tolerance)
boolean isEmpty()
true iff this object contains no weights and no majority threshold.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||