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