Click or drag to resize
Accord.NET (logo)

NonlinearConstraint Constructor (IObjectiveFunction, ExpressionFuncDouble, ConstraintType, Double, ExpressionFuncDouble, Double)

Constructs a new nonlinear constraint.

Namespace:  Accord.Math.Optimization
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public NonlinearConstraint(
	IObjectiveFunction objective,
	Expression<Func<double>> function,
	ConstraintType shouldBe,
	double value,
	Expression<Func<double[]>> gradient = null,
	double withinTolerance = 1E-08
)
Request Example View Source

Parameters

objective
Type: Accord.Math.OptimizationIObjectiveFunction
The objective function to which this constraint refers.
function
Type: System.Linq.ExpressionsExpressionFuncDouble
A lambda expression defining the left hand side of the constraint equation.
shouldBe
Type: Accord.Math.OptimizationConstraintType
How the left hand side of the constraint should be compared to the given value.
value
Type: SystemDouble
The right hand side of the constraint equation.
gradient (Optional)
Type: System.Linq.ExpressionsExpressionFuncDouble
A lambda expression defining the gradient of the function.
withinTolerance (Optional)
Type: SystemDouble
The tolerance for violations of the constraint. Equality constraints should set this to a small positive value. Default is 1e-8.
See Also