PreferenceGraphExploiter
public class PreferenceGraphWFNFS extends java.lang.Object implements PreferenceGraphExploiter
Constructor | Description |
---|---|
PreferenceGraphWFNFS(java.util.Hashtable<Field,java.lang.Double> atLeastWeights,
java.util.Hashtable<Field,java.lang.Double> atMostWeights) |
Constructor for
PreferenceGraphWFNFS class. |
Modifier and Type | Method | Description |
---|---|---|
Ranking |
generateRanking(PreferenceGraph preferenceGraph) |
Generates ranking of objects from given preference graph.
|
public PreferenceGraphWFNFS(java.util.Hashtable<Field,java.lang.Double> atLeastWeights, java.util.Hashtable<Field,java.lang.Double> atMostWeights)
PreferenceGraphWFNFS
class.
If atLeastWeights == null
, it means that only at most relations from preference graph should be used.
If atMostWeights == null
, it means that only at least relations from preference graph should be used.
If both hash tables of weights are null
, then exception is thrown.atLeastWeights
- Set of "at least" weights. See atLeastWeights
.atMostWeights
- Set of "at most" weights. See atMostWeights
.java.lang.NullPointerException
- when both at least and at most weights are null
InvalidValueException
- when hash table with at least or at most weights is not null
but emptypublic Ranking generateRanking(PreferenceGraph preferenceGraph)
null
,
then uses only "at most" (resp. "at least") relations.generateRanking
in interface PreferenceGraphExploiter
preferenceGraph
- preference graph to be exploitedjava.lang.NullPointerException
- when preference graph is null
ValueNotFoundException
- when "at least" weights are stored but preference graph does not contain any relation "at least",
when "at most" weights are stored but preference graph does not contain any relation "at most"
or when there is no weight stored in this class for the reference value of some "at least" / "at most" relation from the graph