public interface LSLambdaFunction
LSOperator.LambdaFunction
in LocalSolver. A lambda function is a
particular LSExpression
composed of two parts:
LSOperator.Argument
.Modifier and Type | Method and Description |
---|---|
LSExpression |
call(LSExpression[] arguments)
Evaluate and returns the body of the function.
|
LSExpression call(LSExpression[] arguments)
LSModel.createLambdaFunction(int, localsolver.LSLambdaFunction)
with an array of LSExpression of type LSOperator.Argument
. The
size of the array will depend on the number of arguments you want for
your function. The number of arguments is specified when you call the
LSModel.createLambdaFunction(int, localsolver.LSLambdaFunction)
.
Your implementation must return an LSExpression that will be used as the body
of your LocalSolver function.