HxLambdaFunction Delegate

Lambda function delegates. These particular delegates are used to instantiate LambdaFunction in Hexaly Optimizer.

A lambda function is a particular HxExpression composed of two parts:

  • The arguments of the function (which are also HxExpression of type Argument).

  • The body of the function. The body is an HxExpression that will be used to evaluate the result of the function. The body can be any HxExpression composed of any operands and operators supported by Hexaly Optimizer.

The following delegates are used by the method HxModel.CreateLambdaFunction to instanciate very easily, in one declaration, the arguments and the body of the Hexaly Optimizer function.

since:

9.5

delegate HxExpression Hexaly.Optimizer.HxLambdaFunction0()

Delegate used to create a lambda function without argument. This delegate can be used with the method HxModel.CreateLambdaFunction. In that case, your delegate will be called once, without argument. It must return an HxExpression that will be used as the body of your Hexaly Optimizer lambda function.

delegate HxExpression Hexaly.Optimizer.HxLambdaFunction1(HxExpression a)

Delegate used to create a lambda function with one argument. This delegate can be used with the method HxModel.CreateLambdaFunction. In that case, your delegate will be called once, with one HxExpression of type Argument. It must return an HxExpression that will be used as the body of your Hexaly Optimizer lambda function.

delegate HxExpression Hexaly.Optimizer.HxLambdaFunction2(HxExpression a, HxExpression b)

Delegate used to create a lambda function with two arguments. This delegate can be used with the method HxModel.CreateLambdaFunction. In that case, your delegate will be called once, with two HxExpression of type Argument. It must return an HxExpression that will be used as the body of your Hexaly Optimizer lambda function.

delegate HxExpression Hexaly.Optimizer.HxLambdaFunction3(HxExpression a, HxExpression b, HxExpression c)

Delegate used to create a lambda function with three arguments. This delegate can be used with the method HxModel.CreateLambdaFunction. In that case, your delegate will be called once, with three HxExpression of type Argument. It must return an HxExpression that will be used as the body of your Hexaly Optimizer lambda function.

delegate HxExpression Hexaly.Optimizer.HxLambdaFunction(HxExpression[] arguments)

Delegate used to create a lambda function with arguments. This delegate can be used with the method HxModel.CreateLambdaFunction. In that case, your delegate will be called once, with an array of HxExpression of type Argument. The size of the array will depend on the number of arguments you want for your lambda function. The number of arguments is specified when you call the method HxModel.CreateLambdaFunction. This delegate must return an HxExpression that will be used as the body of your Hexaly Optimizer lambda function.