Class SimpleProductSemantics

  • All Implemented Interfaces:
    java.util.Comparator<java.lang.Double>

    public class SimpleProductSemantics
    extends AbstractSocialSemantics<java.lang.Double>
    The simple product semantics from [Leite, Martins; IJCAI 2011, Def. 5,6]
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double precision
      Precision of comparisons between values.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleProductSemantics​(double epsilon)
      Creates a new simple product semantics with the given epsilon parameter for the simple vote aggregation function.
      SimpleProductSemantics​(double epsilon, double precision)
      Creates a new simple product semantics with the given epsilon parameter for the simple vote aggregation function.
    • Method Summary

      Modifier and Type Method Description
      java.lang.Double and​(java.lang.Double arg1, java.lang.Double arg2)
      The AND-operation on L in this framework
      java.lang.Double bottomElement()
      Returns the bottom element of this semantics.
      int compare​(java.lang.Double arg0, java.lang.Double arg1)  
      java.lang.Double neg​(java.lang.Double arg)
      The NEG-operation on L in this framework
      java.lang.Double or​(java.lang.Double arg1, java.lang.Double arg2)
      The OR-operation on L in this framework
      java.lang.Double supp​(int pos, int neg)
      The vote aggregation function
      java.lang.Double topElement()
      Returns the top element of this semantics.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • precision

        public double precision
        Precision of comparisons between values.
    • Constructor Detail

      • SimpleProductSemantics

        public SimpleProductSemantics​(double epsilon,
                                      double precision)
        Creates a new simple product semantics with the given epsilon parameter for the simple vote aggregation function.
        Parameters:
        epsilon - some non-negative value
        precision - precision of comparisons between values.
      • SimpleProductSemantics

        public SimpleProductSemantics​(double epsilon)
        Creates a new simple product semantics with the given epsilon parameter for the simple vote aggregation function. The value 0.001 is used as precision of comparisons between values.
        Parameters:
        epsilon - some non-negative value
    • Method Detail

      • supp

        public java.lang.Double supp​(int pos,
                                     int neg)
        Description copied from class: AbstractSocialSemantics
        The vote aggregation function
        Specified by:
        supp in class AbstractSocialSemantics<java.lang.Double>
        Parameters:
        pos - the number of positive votes
        neg - the number of negative votes
        Returns:
        the social support aggregated from the votes.
      • and

        public java.lang.Double and​(java.lang.Double arg1,
                                    java.lang.Double arg2)
        Description copied from class: AbstractSocialSemantics
        The AND-operation on L in this framework
        Specified by:
        and in class AbstractSocialSemantics<java.lang.Double>
        Parameters:
        arg1 - some value in L
        arg2 - some value in L
        Returns:
        the AND of the both values
      • or

        public java.lang.Double or​(java.lang.Double arg1,
                                   java.lang.Double arg2)
        Description copied from class: AbstractSocialSemantics
        The OR-operation on L in this framework
        Specified by:
        or in class AbstractSocialSemantics<java.lang.Double>
        Parameters:
        arg1 - some value in L
        arg2 - some value in L
        Returns:
        the OR of the both values
      • neg

        public java.lang.Double neg​(java.lang.Double arg)
        Description copied from class: AbstractSocialSemantics
        The NEG-operation on L in this framework
        Specified by:
        neg in class AbstractSocialSemantics<java.lang.Double>
        Parameters:
        arg - some value in L
        Returns:
        the negation of the given value.
      • compare

        public int compare​(java.lang.Double arg0,
                           java.lang.Double arg1)
        Specified by:
        compare in interface java.util.Comparator<java.lang.Double>
        Specified by:
        compare in class AbstractSocialSemantics<java.lang.Double>