Class SinglePeakWeightVector

  • All Implemented Interfaces:
    WeightVector

    public class SinglePeakWeightVector
    extends 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 Detail

      • 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 Detail

      • getWeight

        public int getWeight​(int n)
        checks, whether an element got the highest rank
        Specified by:
        getWeight in interface WeightVector
        Parameters:
        n - the given parameter to compare with
        Returns:
        1 if highest, 0 otherwise