Click or drag to resize
Accord.NET (logo)

LinearConstraintTryParse Method (String, CultureInfo, 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,
	CultureInfo culture,
	IObjectiveFunction function,
	out LinearConstraint constraint
)
Request Example View Source

Parameters

str
Type: SystemString
The string containing the constraint in textual form.
culture
Type: System.GlobalizationCultureInfo
The culture information specifying how numbers written in the constraint should be parsed. Default is CultureInfo.InvariantCulture.
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