Class AbstractBinaryArithmeticOperator
java.lang.Object
org.projog.core.math.AbstractArithmeticOperator
org.projog.core.math.AbstractBinaryArithmeticOperator
- All Implemented Interfaces:
KnowledgeBaseConsumer, ArithmeticOperator, PreprocessableArithmeticOperator
A template for
ArithmeticOperators that accept two arguments.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Numericprotected abstract doublecalculateDouble(double n1, double n2) Returns the result of evaluating an arithmetic expression using the two argumentsprotected abstract longcalculateLong(long n1, long n2) Returns the result of evaluating an arithmetic expression using the two argumentsMethods inherited from class AbstractArithmeticOperator
calculate, calculate, isPure, preprocess, setKnowledgeBase
-
Constructor Details
-
AbstractBinaryArithmeticOperator
public AbstractBinaryArithmeticOperator()
-
-
Method Details
-
calculate
- Overrides:
calculatein classAbstractArithmeticOperator
-
calculateDouble
protected abstract double calculateDouble(double n1, double n2) Returns the result of evaluating an arithmetic expression using the two arguments -
calculateLong
protected abstract long calculateLong(long n1, long n2) Returns the result of evaluating an arithmetic expression using the two arguments
-