Package org.projog.core.math
Class AbstractBinaryIntegerArithmeticOperator
- java.lang.Object
-
- org.projog.core.math.AbstractArithmeticOperator
-
- org.projog.core.math.AbstractBinaryIntegerArithmeticOperator
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,ArithmeticOperator,PreprocessableArithmeticOperator
- Direct Known Subclasses:
BitwiseAnd,BitwiseOr,BitwiseXor,IntegerDivide,Modulo,Remainder,ShiftLeft,ShiftRight
public abstract class AbstractBinaryIntegerArithmeticOperator extends AbstractArithmeticOperator
A template forArithmeticOperators that accept two arguments of typeTermType.INTEGER.
-
-
Constructor Summary
Constructors Constructor Description AbstractBinaryIntegerArithmeticOperator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Numericcalculate(Numeric n1, Numeric n2)protected abstract longcalculateLong(long n1, long n2)Returns the result of evaluating an arithmetic expression using the two argumentsprivate longtoLong(Numeric n)-
Methods inherited from class org.projog.core.math.AbstractArithmeticOperator
calculate, calculate, isPure, preprocess, setKnowledgeBase
-
-
-
-
Method Detail
-
calculate
public final Numeric calculate(Numeric n1, Numeric n2)
- Overrides:
calculatein classAbstractArithmeticOperator
-
toLong
private long toLong(Numeric n)
-
calculateLong
protected abstract long calculateLong(long n1, long n2)Returns the result of evaluating an arithmetic expression using the two arguments
-
-