Class LevelingFunction<T>
java.lang.Object
java.util.AbstractMap<T,Integer>
 
java.util.HashMap<T,Integer>
 
org.tweetyproject.preferences.ranking.Functions<T>
org.tweetyproject.preferences.ranking.LevelingFunction<T>
- Type Parameters:
- T- the generic type used for this leveling function
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<T,- Integer> 
This class is meant to provide leveling functions to given preference orders
 and vice versa.
 TODO exception handling for invalid preference orders (total preorder)
- Author:
- Bastian Wolf
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Constructor SummaryConstructorsConstructorDescriptionconstructs a new, empty leveling function caller can use Map-method putAll to fill this empty leveling functionthis constructor creates a leveling function using a given preference order
- 
Method SummaryModifier and TypeMethodDescriptionthis method returns a preference order made out of this leveling functionreturns this leveling functionreturns a new RankingFunction based on this LevelingFunctionvoidstrengthenElement(T element) strengthens the given element in the leveling functionvoidweakenElement(T element) weakens the given element in the leveling functionMethods inherited from class org.tweetyproject.preferences.ranking.FunctionscontainsKey, containsValue, get, getElementsByValue, getPredecessors, getSuccessors, toString, valuesMethods inherited from class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, sizeMethods inherited from class java.util.AbstractMapequals, hashCode
- 
Constructor Details- 
LevelingFunctionpublic LevelingFunction()constructs a new, empty leveling function caller can use Map-method putAll to fill this empty leveling function
- 
LevelingFunctionthis constructor creates a leveling function using a given preference order- Parameters:
- po- the given preference order
 
 
- 
- 
Method Details- 
getLevelingFunction
- 
getRankingFunctionreturns a new RankingFunction based on this LevelingFunction- Returns:
- a new RankingFunction based on this LevelingFunction
 
- 
generatePreferenceOrderthis method returns a preference order made out of this leveling function- Specified by:
- generatePreferenceOrderin class- Functions<T>
- Returns:
- a preference order out of a given leveling function
 
- 
weakenElementweakens the given element in the leveling function- Specified by:
- weakenElementin class- Functions<T>
- Parameters:
- element- the element being weakened
 
- 
strengthenElementstrengthens the given element in the leveling function- Specified by:
- strengthenElementin class- Functions<T>
- Parameters:
- element- the element being strengthened
 
 
-