BinaryMathFunction

abstract class BinaryMathFunction: MathFunction

Base class to implement unary math functions

Constructors

<init>

constructor(name: String)

Base class to implement unary math functions

Parameters

Name Description
name: String

the function name

Methods

uncheckedImplementation

protected open fun uncheckedImplementation(request: Request<ExecutionContext>): Response

The function expressing the implementation of the PrologFunction, without any check for application to correct signature

Parameters

Name Description
request: Request<ExecutionContext>

ReturnValue

Name Description
Response

mathFunction

protected abstract fun mathFunction(integer1: Integer, integer2: Integer, context: ExecutionContext): Numeric

The actual math function implementation, for Integers

Parameters

Name Description
integer1: Integer
integer2: Integer
context: ExecutionContext

ReturnValue

Name Description
Numeric

mathFunction

protected abstract fun mathFunction(real: Real, integer: Integer, context: ExecutionContext): Numeric

The actual math function implementation, for Real and Integer

Parameters

Name Description
real: Real
integer: Integer
context: ExecutionContext

ReturnValue

Name Description
Numeric

mathFunction

protected abstract fun mathFunction(integer: Integer, real: Real, context: ExecutionContext): Numeric

The actual math function implementation, for Integer and Real

Parameters

Name Description
integer: Integer
real: Real
context: ExecutionContext

ReturnValue

Name Description
Numeric

mathFunction

protected abstract fun mathFunction(real1: Real, real2: Real, context: ExecutionContext): Numeric

The actual math function implementation, for Reals

Parameters

Name Description
real1: Real
real2: Real
context: ExecutionContext

ReturnValue

Name Description
Numeric