Class Power

java.lang.Object
org.projog.core.math.builtin.Power
All Implemented Interfaces:
KnowledgeBaseConsumer, ArithmeticOperator

public final class Power extends Object implements ArithmeticOperator, KnowledgeBaseConsumer
** - calculates the result of the first argument raised to the power of the second argument.
  • Constructor Details

    • Power

      public Power()
  • Method Details

    • calculate

      public Numeric calculate(Term term)
      Description copied from interface: ArithmeticOperator
      Returns the result of the calculation using the specified arguments.
      Specified by:
      calculate in interface ArithmeticOperator
      Parameters:
      term - the arguments to use in the calculation
      Returns:
      the result of the calculation using the specified arguments
    • setKnowledgeBase

      public void setKnowledgeBase(KnowledgeBase kb)
      Description copied from interface: KnowledgeBaseConsumer
      Provides a reference to a KnowledgeBase.
      Specified by:
      setKnowledgeBase in interface KnowledgeBaseConsumer
    • integerPow

      public static long integerPow(long base, long exponent)