Class IndicatorUtilityFunction

  • All Implemented Interfaces:
    UtilityFunction

    public class IndicatorUtilityFunction
    extends java.lang.Object
    implements UtilityFunction
    This class represents an indicator utility function, i.e. a function that ranks a set of propositions to 1 if this function's focal element is part of the set, and 0 otherwise.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Proposition focalElement
      The focal element of this function.
    • Constructor Summary

      Constructors 
      Constructor Description
      IndicatorUtilityFunction​(Proposition focalElement)
      Creates a new indicator utility function for the given focal element.
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      int rank​(java.util.Collection<? extends Proposition> propositions)
      Rank the given collection of propositions.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • focalElement

        private Proposition focalElement
        The focal element of this function.
    • Constructor Detail

      • IndicatorUtilityFunction

        public IndicatorUtilityFunction​(Proposition focalElement)
        Creates a new indicator utility function for the given focal element.
        Parameters:
        focalElement - a proposition.
    • Method Detail

      • rank

        public int rank​(java.util.Collection<? extends Proposition> propositions)
        Description copied from interface: UtilityFunction
        Rank the given collection of propositions. A set S is preferred to a set T if rank(S)>rank(T).
        Specified by:
        rank in interface UtilityFunction
        Parameters:
        propositions - a collection of propositions.
        Returns:
        the rank of the given collection.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object