Class Random
java.lang.Object
org.projog.core.math.AbstractArithmeticOperator
org.projog.core.math.builtin.Random
- All Implemented Interfaces:
KnowledgeBaseConsumer, ArithmeticOperator, PreprocessableArithmeticOperator
random(X) Evaluate to a random integer i for which 0 =< i < X.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractArithmeticOperator
calculate, calculate, preprocess, setKnowledgeBase
-
Constructor Details
-
Random
public Random()
-
-
Method Details
-
calculate
- Overrides:
calculatein classAbstractArithmeticOperator
-
isPure
protected boolean isPure()Random is not pure. Multiple calls with the same argument do not produce identical results.- Overrides:
isPurein classAbstractArithmeticOperator- Returns:
- true if pure and so can be preprocessed, else false
-