Class AddUserDefinedArithmeticOperator.UserDefinedArithmeticOperator
- java.lang.Object
-
- org.projog.core.predicate.builtin.kb.AddUserDefinedArithmeticOperator.UserDefinedArithmeticOperator
-
- All Implemented Interfaces:
ArithmeticOperator
- Enclosing class:
- AddUserDefinedArithmeticOperator
private static final class AddUserDefinedArithmeticOperator.UserDefinedArithmeticOperator extends java.lang.Object implements ArithmeticOperator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) PredicateKeykey(package private) intnumArgs(package private) PredicateFactorypf
-
Constructor Summary
Constructors Constructor Description UserDefinedArithmeticOperator(Predicates p, PredicateKey originalKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Numericcalculate(Term[] args)Returns the result of the calculation using the specified arguments.private Term[]createArgumentsIncludingResult(Term[] args, Variable result)
-
-
-
Field Detail
-
numArgs
final int numArgs
-
key
final PredicateKey key
-
pf
final PredicateFactory pf
-
-
Constructor Detail
-
UserDefinedArithmeticOperator
UserDefinedArithmeticOperator(Predicates p, PredicateKey originalKey)
-
-
Method Detail
-
calculate
public Numeric calculate(Term[] args)
Description copied from interface:ArithmeticOperatorReturns the result of the calculation using the specified arguments.- Specified by:
calculatein interfaceArithmeticOperator- Parameters:
args- the arguments to use in the calculation- Returns:
- the result of the calculation using the specified arguments
-
-