Package org.projog.core.math.builtin
Class IntegerDivide
java.lang.Object
org.projog.core.math.AbstractArithmeticOperator
org.projog.core.math.AbstractBinaryIntegerArithmeticOperator
org.projog.core.math.builtin.IntegerDivide
- All Implemented Interfaces:
KnowledgeBaseConsumer,ArithmeticOperator,PreprocessableArithmeticOperator
// - performs integer division.
The result will be rounded towards zero. e.g. 7 // 2 is rounded down to 3 while
-7 // 2 is rounded up to -3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longcalculateLong(long dividend, long divisor) Returns the result of evaluating an arithmetic expression using the two argumentsMethods inherited from class org.projog.core.math.AbstractBinaryIntegerArithmeticOperator
calculateMethods inherited from class org.projog.core.math.AbstractArithmeticOperator
calculate, calculate, isPure, preprocess, setKnowledgeBase
-
Constructor Details
-
IntegerDivide
public IntegerDivide()
-
-
Method Details
-
calculateLong
protected long calculateLong(long dividend, long divisor) Description copied from class:AbstractBinaryIntegerArithmeticOperatorReturns the result of evaluating an arithmetic expression using the two arguments- Specified by:
calculateLongin classAbstractBinaryIntegerArithmeticOperator
-