Class Power
java.lang.Object
org.projog.core.math.builtin.Power
- All Implemented Interfaces:
KnowledgeBaseConsumer, ArithmeticOperator
** - calculates the result of the first argument raised to the power of the second argument.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the result of the calculation using the specified arguments.static longintegerPow(long base, long exponent) voidProvides a reference to aKnowledgeBase.
-
Constructor Details
-
Power
public Power()
-
-
Method Details
-
calculate
Description copied from interface:ArithmeticOperatorReturns the result of the calculation using the specified arguments.- Specified by:
calculatein interfaceArithmeticOperator- Parameters:
term- the arguments to use in the calculation- Returns:
- the result of the calculation using the specified arguments
-
setKnowledgeBase
Description copied from interface:KnowledgeBaseConsumerProvides a reference to aKnowledgeBase.- Specified by:
setKnowledgeBasein interfaceKnowledgeBaseConsumer
-
integerPow
public static long integerPow(long base, long exponent)
-