UnaryMathFunction

abstract class UnaryMathFunction: 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(integer: Integer, context: ExecutionContext): Numeric

The actual math function implementation, for Integers

Parameters

Name Description
integer: Integer
context: ExecutionContext

ReturnValue

Name Description
Numeric

mathFunction

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

The actual math function implementation, for Reals

Parameters

Name Description
real: Real
context: ExecutionContext

ReturnValue

Name Description
Numeric