public class min extends DefaultInternalAction
Internal action: .min
.
Description: gets the minimum value of a list of terms, using
the "natural" order of terms. Between
different types of terms, the following order is
used:
numbers < atoms < structures < lists
Parameters:
Examples:
.min([c,a,b],X)
: X
unifies with
a
.
.min([b,c,10,g,f(10),[3,4],5,[3,10],f(4)],X)
:
X
unifies with 5
.
.min([3,2,5],2)
: true.
.min([3,2,5],5)
: false.
.min([],X)
: false.
concat
,
delete
,
length
,
member
,
nth
,
sort
,
max
,
reverse
,
difference
,
intersection
,
union
,
Serialized FormConstructor and Description |
---|
min() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkArguments(Term[] args) |
protected boolean |
compare(Term a,
Term t) |
static InternalAction |
create() |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
canBeUsedInContext, destroy, prepareArguments, suspendIntention
public static InternalAction create()
public int getMinArgs()
getMinArgs
in class DefaultInternalAction
public int getMaxArgs()
getMaxArgs
in class DefaultInternalAction
protected void checkArguments(Term[] args) throws JasonException
checkArguments
in class DefaultInternalAction
JasonException
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
execute
in class DefaultInternalAction
java.lang.Exception