Class SinglePeakWeightVector
java.lang.Object
org.tweetyproject.preferences.aggregation.SinglePeakWeightVector
- All Implemented Interfaces:
WeightVector
The single peak implementation of the weight vector, where only the highest rated value in each preference order scores
(1,0,0,0,0,0)
- Author:
- bwolf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getWeight
(int n) checks, whether an element got the highest rank
-
Constructor Details
-
SinglePeakWeightVector
public SinglePeakWeightVector(int m) constructor for weight vector with peak value- Parameters:
m
- the value used to determine the weight of an object
-
-
Method Details
-
getWeight
public int getWeight(int n) checks, whether an element got the highest rank- Specified by:
getWeight
in interfaceWeightVector
- Parameters:
n
- the given parameter to compare with- Returns:
- 1 if highest, 0 otherwise
-