Class AbstractUnaryArithmeticOperator

java.lang.Object
org.projog.core.math.AbstractArithmeticOperator
org.projog.core.math.AbstractUnaryArithmeticOperator
All Implemented Interfaces:
KnowledgeBaseConsumer, ArithmeticOperator, PreprocessableArithmeticOperator
Direct Known Subclasses:
Abs, Minus

public abstract class AbstractUnaryArithmeticOperator extends AbstractArithmeticOperator
A template for ArithmeticOperators that accept exactly one argument.
  • Constructor Details

    • AbstractUnaryArithmeticOperator

      public AbstractUnaryArithmeticOperator()
  • Method Details

    • calculate

      public final Numeric calculate(Numeric n)
      Overrides:
      calculate in class AbstractArithmeticOperator
    • calculateDouble

      protected abstract double calculateDouble(double n)
      Returns the result of evaluating an arithmetic expression using the specified argument
    • calculateLong

      protected abstract long calculateLong(long n)
      Returns the result of evaluating an arithmetic expression using the specified argument