Class SimpleProductSemantics
java.lang.Object
org.tweetyproject.arg.social.semantics.AbstractSocialSemantics<Double>
org.tweetyproject.arg.social.semantics.SimpleProductSemantics
- All Implemented Interfaces:
Comparator<Double>
The simple product semantics from [Leite, Martins; IJCAI 2011, Def. 5,6]
- Author:
- Matthias Thimm
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleProductSemantics
(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 TypeMethodDescriptionThe AND-operation on L in this frameworkReturns the bottom element of this semantics.int
Compares two `Double` values according to the specific social semantics implemented by this class.The NEG-operation on L in this frameworkThe OR-operation on L in this frameworksupp
(int pos, int neg) The vote aggregation functionReturns the top element of this semantics.Methods inherited from class org.tweetyproject.arg.social.semantics.AbstractSocialSemantics
and, or
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 Details
-
precision
public double precisionPrecision of comparisons between values.
-
-
Constructor Details
-
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 valueprecision
- 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 Details
-
bottomElement
Description copied from class:AbstractSocialSemantics
Returns the bottom element of this semantics.- Specified by:
bottomElement
in classAbstractSocialSemantics<Double>
- Returns:
- the bottom element of this semantics.
-
topElement
Description copied from class:AbstractSocialSemantics
Returns the top element of this semantics.- Specified by:
topElement
in classAbstractSocialSemantics<Double>
- Returns:
- the top element of this semantics.
-
supp
Description copied from class:AbstractSocialSemantics
The vote aggregation function- Specified by:
supp
in classAbstractSocialSemantics<Double>
- Parameters:
pos
- the number of positive votesneg
- the number of negative votes- Returns:
- the social support aggregated from the votes.
-
and
Description copied from class:AbstractSocialSemantics
The AND-operation on L in this framework- Specified by:
and
in classAbstractSocialSemantics<Double>
- Parameters:
arg1
- some value in Larg2
- some value in L- Returns:
- the AND of the both values
-
or
Description copied from class:AbstractSocialSemantics
The OR-operation on L in this framework- Specified by:
or
in classAbstractSocialSemantics<Double>
- Parameters:
arg1
- some value in Larg2
- some value in L- Returns:
- the OR of the both values
-
neg
Description copied from class:AbstractSocialSemantics
The NEG-operation on L in this framework- Specified by:
neg
in classAbstractSocialSemantics<Double>
- Parameters:
arg
- some value in L- Returns:
- the negation of the given value.
-
compare
Description copied from class:AbstractSocialSemantics
Compares two `Double` values according to the specific social semantics implemented by this class.- Specified by:
compare
in interfaceComparator<Double>
- Specified by:
compare
in classAbstractSocialSemantics<Double>
- Parameters:
arg0
- the first `Double` value to be compared.arg1
- the second `Double` value to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first argument (`arg0`) is less than, equal to, or greater than the second (`arg1`), respectively.
- See Also:
-