Click or drag to resize
Accord.NET (logo)

LinearConstraintTryParse Method (String, IObjectiveFunction, LinearConstraint)

Attempts to create a LinearConstraint from a String representation.

Namespace:  Accord.Math.Optimization
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static bool TryParse(
	string str,
	IObjectiveFunction function,
	out LinearConstraint constraint
)
Request Example View Source

Parameters

str
Type: SystemString
The string containing the constraint in textual form.
function
Type: Accord.Math.OptimizationIObjectiveFunction
The objective function to which this constraint refers to.
constraint
Type: Accord.Math.OptimizationLinearConstraint
The resulting constraint, if it could be parsed.

Return Value

Type: Boolean
true if the function could be parsed from the string, false otherwise.
See Also