Class Abs
java.lang.Object
org.projog.core.math.AbstractArithmeticOperator
org.projog.core.math.AbstractUnaryArithmeticOperator
org.projog.core.math.builtin.Abs
- All Implemented Interfaces:
KnowledgeBaseConsumer, ArithmeticOperator, PreprocessableArithmeticOperator
abs - returns the absolute value of a numeric argument.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculateDouble(double n) Returns the result of evaluating an arithmetic expression using the specified argumentprotected longcalculateLong(long n) Returns the result of evaluating an arithmetic expression using the specified argumentMethods inherited from class AbstractUnaryArithmeticOperator
calculateMethods inherited from class AbstractArithmeticOperator
calculate, calculate, isPure, preprocess, setKnowledgeBase
-
Constructor Details
-
Abs
public Abs()
-
-
Method Details
-
calculateDouble
protected double calculateDouble(double n) Description copied from class:AbstractUnaryArithmeticOperatorReturns the result of evaluating an arithmetic expression using the specified argument- Specified by:
calculateDoublein classAbstractUnaryArithmeticOperator
-
calculateLong
protected long calculateLong(long n) Description copied from class:AbstractUnaryArithmeticOperatorReturns the result of evaluating an arithmetic expression using the specified argument- Specified by:
calculateLongin classAbstractUnaryArithmeticOperator
-