PreferenceGraphExploiter
public class RankRule extends java.lang.Object implements PreferenceGraphExploiter
Constructor | Description |
---|---|
RankRule(Field referenceValue,
int consideredRelations) |
Constructor for
RankRule class. |
Modifier and Type | Method | Description |
---|---|---|
SimpleRanking |
generateRanking(PreferenceGraph preferenceGraph) |
Exploits given preference graph and works out final recommendation in terms of ranking of objects.
|
int |
getConsideredRelations() |
Tells whether "at least" or "at most" relation is be explored.
|
Field |
getReferenceValue() |
Gets reference value of explored "at least" / "at most" relation
|
void |
setConsideredRelations(int consideredRelations) |
Sets information concerning type of explored relation
|
void |
setReferenceValue(Field referenceValue) |
Sets reference value of explored "at least" / "at most" relation
|
public RankRule(Field referenceValue, int consideredRelations)
RankRule
class.referenceValue
- reference value of explored "at least" / "at most" relationconsideredRelations
- tells whether "at least" or "at most" relation should be exploredInvalidValueException
- when consideredRelations
are neither PreferenceGraph.AT_LEAST_RELATIONS
nor PreferenceGraph.AT_MOST_RELATIONS
public SimpleRanking generateRanking(PreferenceGraph preferenceGraph)
generateRanking
in interface PreferenceGraphExploiter
preferenceGraph
- see PreferenceGraphExploiter.generateRanking(pl.poznan.put.cs.idss.jrs.ranking.PreferenceGraph)
PreferenceGraphExploiter.generateRanking(pl.poznan.put.cs.idss.jrs.ranking.PreferenceGraph)
ValueNotFoundException
- when at least relations should be considered but given preference graph can not contain any relation "at least",
when at most relations should be considered but given preference graph can not contain any relation "at most"public Field getReferenceValue()
public void setReferenceValue(Field referenceValue)
referenceValue
- reference value of explored "at least" / "at most" relationpublic int getConsideredRelations()
PreferenceGraph.AT_LEAST_RELATIONS
or PreferenceGraph.AT_MOST_RELATIONS
.PreferenceGraph.AT_LEAST_RELATIONS
or PreferenceGraph.AT_MOST_RELATIONS
.public void setConsideredRelations(int consideredRelations)
consideredRelations
- information concerning type of explored relation. Can be equal to either
PreferenceGraph.AT_LEAST_RELATIONS
or PreferenceGraph.AT_MOST_RELATIONS
.InvalidValueException
- when consideredRelations
are neither PreferenceGraph.AT_LEAST_RELATIONS
nor PreferenceGraph.AT_MOST_RELATIONS