Package jason.stdlib
Class set_random_seed
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.set_random_seed
- All Implemented Interfaces:
InternalAction
,Serializable
@Manual(literal="math.set_random_seed(seed)",
hint="generates a random number between 0 and 1",
argsHint="sets the seed of Jason\'s random number generator",
argsType="number",
examples=".set_random_seed(20): sets the random number generator\'s seed to 20",
seeAlso={"jason.functions.Random","jason.stdlib.random"})
public class set_random_seed
extends DefaultInternalAction
Internal action: .set_random_seed(N)
.
Description: sets the seed of Jason's random number generator
Parameter:
- - seed (number): the value to which the random seed is to be set
Example:
.set_random_seed(20)
: Sets the random number generator's seed to 20.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.static Random
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, getMaxArgs, getMinArgs, prepareArguments, suspendIntention
-
Constructor Details
-
set_random_seed
public set_random_seed()
-
-
Method Details
-
getAgRandomIA
- Throws:
Exception
-
execute
Description copied from interface:InternalAction
Executes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action). - Specified by:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
Exception
-