Class SinglePeakWeightVector
- java.lang.Object
-
- net.sf.tweety.preferences.aggregation.SinglePeakWeightVector
-
- All Implemented Interfaces:
WeightVector
public class SinglePeakWeightVector extends java.lang.Object implements 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
Constructors Constructor Description SinglePeakWeightVector(int m)
constructor for weight vector with peak value
-
Method Summary
Modifier and Type Method Description int
getWeight(int n)
checks, whether an element got the highest rank
-
-
-
Method Detail
-
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
-
-