Package org.tweetyproject.lp.asp.syntax
Enum ASPOperator.AggregateFunction
java.lang.Object
java.lang.Enum<ASPOperator.AggregateFunction>
org.tweetyproject.lp.asp.syntax.ASPOperator.AggregateFunction
- All Implemented Interfaces:
Serializable
,Comparable<ASPOperator.AggregateFunction>
,Constable
- Enclosing class:
ASPOperator
The following aggregate functions are supported by the ASP-Core-2 standard
and by Tweety. 'weight' in this context is the first element of an aggregate
element (term tuple).
- #count: Number of elements, used to represent cardinality constraints.
- #sum: Sum of weights, used to represent weight constraints.
- #max: Maximum weight
- #min: Minimum weight
Clingo additionally includes the #sum+ aggregate function, which represents the sum of positive weights.
DLV additionally includes the #times aggregate function. #times is similar to #sum, but computes the product of the first local variable to be aggregated over in the symbolic set. For the empty set, #times returns 1.
- #count: Number of elements, used to represent cardinality constraints.
- #sum: Sum of weights, used to represent weight constraints.
- #max: Maximum weight
- #min: Minimum weight
Clingo additionally includes the #sum+ aggregate function, which represents the sum of positive weights.
DLV additionally includes the #times aggregate function. #times is similar to #sum, but computes the product of the first local variable to be aggregated over in the symbolic set. For the empty set, #times returns 1.
- Author:
- Anna Gessler
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCounts the number of elements.Finds the maximum value among the elements.Finds the minimum value among the elements.Calculates the sum of the elements.Calculates the sum, treating all elements as positive values.Calculates the product of the elements. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
Returns the enum constant of this type with the specified name.static ASPOperator.AggregateFunction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
COUNT
Counts the number of elements. -
MAX
Finds the maximum value among the elements. -
MIN
Finds the minimum value among the elements. -
SUM
Calculates the sum of the elements. -
SUM_PLUS
Calculates the sum, treating all elements as positive values. -
TIMES
Calculates the product of the elements.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<ASPOperator.AggregateFunction>
-