Click or drag to resize
Accord.NET (logo)

NonlinearConstraint Constructor (IObjectiveFunction, FuncDouble, Double, ConstraintType, Double, FuncDouble, Double, 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,
	Func<double[], double> function,
	ConstraintType shouldBe = ConstraintType.GreaterThanOrEqualTo,
	double value = 0,
	Func<double[], 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: SystemFuncDouble, Double
A lambda expression defining the left hand side of the constraint equation.
shouldBe (Optional)
Type: Accord.Math.OptimizationConstraintType
How the left hand side of the constraint should be compared to the given value.
value (Optional)
Type: SystemDouble
The right hand side of the constraint equation. Default is 0.
gradient (Optional)
Type: SystemFuncDouble, Double
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