Package jason.stdlib
Class max
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.min
jason.stdlib.max
- All Implemented Interfaces:
InternalAction,Serializable
Internal action: .max.
Description: gets the maximum value within a list of terms,
using the "natural" order for each type of term. Between
different types of terms, the following order is
used:
numbers < atoms < structures < lists
Parameters:
- + list (list): the list where to find the maximum term.
- +/- maximum (term).
Query version:
- + term (variable or structure): the variable or structure whose
instances will be used as max candidate.
- + query (logical formula): the formula used to find values for the term
- +/- result (term): the max value for the query.
Examples:
-
.max([c,a,b],X):Xunifies withc. -
.max([b,c,10,g,f(10),5,f(4)],X):Xunifies withf(10). -
.max([3,2,5],2]): false. -
.max([3,2,5],5): true. -
.max([],X): false. .max(V, b(V), Max): unifies Max with the max V value for query b(V).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jason.stdlib.min
checkArguments, execute, getMaxArgs, getMinArgsMethods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments, suspendIntention