Package localsolver
Interface LSLambdaFunction
-
public interface LSLambdaFunction
Lambda function interface. This particular interface is used to instantiateLSOperator.LambdaFunction
in LocalSolver. A lambda function is a particularLSExpression
composed of two parts:- The arguments of the function (which are also LSExpression of type
LSOperator.Argument
. - The body of the function. The body is an LSExpression that will be used to evaluate the result of the function. The body can be any LSExpression composed of any operands and operators supported by LocalSolver.
- Since:
- 9.5
- The arguments of the function (which are also LSExpression of type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LSExpression
call(LSExpression[] arguments)
Evaluates and returns the body of the function.
-
-
-
Method Detail
-
call
LSExpression call(LSExpression[] arguments)
Evaluates and returns the body of the function. This particular method will be called byLSModel.createLambdaFunction(int, localsolver.LSLambdaFunction)
with an array of LSExpression of typeLSOperator.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 theLSModel.createLambdaFunction(int, localsolver.LSLambdaFunction)
. Your implementation must return an LSExpression that will be used as the body of your LocalSolver function.
-
-