Package org.projog.core.math.builtin
Class Divide
- java.lang.Object
-
- org.projog.core.math.AbstractArithmeticOperator
-
- org.projog.core.math.builtin.Divide
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,ArithmeticOperator,PreprocessableArithmeticOperator
public final class Divide extends AbstractArithmeticOperator
/- performs division.
-
-
Constructor Summary
Constructors Constructor Description Divide()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Numericcalculate(Numeric n1, Numeric n2)private static booleancontainsFraction(Numeric n1, Numeric n2)private DecimalFractiondivideFractions(Numeric n1, Numeric n2)-
Methods inherited from class org.projog.core.math.AbstractArithmeticOperator
calculate, calculate, isPure, preprocess, setKnowledgeBase
-
-
-
-
Method Detail
-
calculate
public Numeric calculate(Numeric n1, Numeric n2)
- Overrides:
calculatein classAbstractArithmeticOperator
-
divideFractions
private DecimalFraction divideFractions(Numeric n1, Numeric n2)
-
-