Package org.projog.core.math.builtin
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
public final class Abs extends AbstractUnaryArithmeticOperator
abs- returns the absolute value of a numeric argument.
-
-
Constructor Summary
Constructors Constructor Description Abs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 argument-
Methods inherited from class org.projog.core.math.AbstractUnaryArithmeticOperator
calculate
-
Methods inherited from class org.projog.core.math.AbstractArithmeticOperator
calculate, calculate, isPure, preprocess, setKnowledgeBase
-
-
-
-
Method Detail
-
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
-
-