createFunction

fun createFunction(key: String, argCount: Int, function: (DoubleArray) -> Double): KthFunction

Helper function to create a KthFunction.

Return

the created KthFunction

Parameters

key

the operator key

argCount

the argument count of the function

function

the function


fun createFunction(key: String, function: (Double) -> Double): KthFunction

Helper function to create a KthFunction with one argument.

Return

the created KthFunction

Parameters

key

the operator key

function

the function


fun createFunction(key: String, function: (Double, Double) -> Double): KthFunction

Helper function to create a KthFunction with two arguments.

Return

the created KthFunction

Parameters

key

the operator key

function

the function