Class Random

java.lang.Object
All Implemented Interfaces:
ArithFunction, java.io.Serializable

public class Random
extends DefaultArithFunction

Function: math.random(N): encapsulates java Math.random; If N is not informed: returns a value greater than or equal to 0.0 and less than 1.0; If N is informed: returns a value greater than or equal to 0.0 and less than N.

Examples:

  • math.random: returns the random number between 0 and 1.
  • math.random(10): returns the random number between 0 and 9.9999.
Author:
Jomi
See Also:
floor, ceil, Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    Random()  
  • Method Summary

    Modifier and Type Method Description
    boolean checkArity​(int a)
    returns true if a is a good number of arguments for the function
    double evaluate​(TransitionSystem ts, Term[] args)
    evaluates/computes the function based on the args
    java.lang.String getName()
    returns the name of the function

    Methods inherited from class jason.asSemantics.DefaultArithFunction

    allowUngroundTerms, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait