C# Class Accord.Math.Optimization.LinearConstraint

Constraint with only linear terms.
Inheritance: IConstraint
Exibir arquivo Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
GetViolation ( double input ) : double

Gets how much the constraint is being violated.

IsViolated ( double input ) : bool

Gets whether this constraint is being violated (within the current tolerance threshold).

LinearConstraint ( IObjectiveFunction function, Expression constraint ) : System

Constructs a new linear constraint.

LinearConstraint ( IObjectiveFunction function, string constraint ) : System

Constructs a new linear constraint.

LinearConstraint ( IObjectiveFunction function, string constraint, CultureInfo format ) : System

Constructs a new linear constraint.

LinearConstraint ( int numberOfVariables ) : System

Constructs a new linear constraint.

TryParse ( string str, CultureInfo culture, IObjectiveFunction function, LinearConstraint &constraint ) : bool

Attempts to create a LinearConstraint from a System.String representation.

TryParse ( string str, IObjectiveFunction function, LinearConstraint &constraint ) : bool

Attempts to create a LinearConstraint from a System.String representation.

Private Methods

Method Description
LinearConstraint ( ) : System
compute ( double input ) : double
gradient ( double x ) : double[]
parse ( double>.Dictionary terms, Expression expr, double &value ) : string
parseExpression ( IObjectiveFunction function, Expression constraint ) : void
parseString ( IObjectiveFunction function, string constraint, CultureInfo culture ) : void

Method Details

GetViolation() public method

Gets how much the constraint is being violated.
public GetViolation ( double input ) : double
input double The function point.
return double

IsViolated() public method

Gets whether this constraint is being violated (within the current tolerance threshold).
public IsViolated ( double input ) : bool
input double The function point.
return bool

LinearConstraint() public method

Constructs a new linear constraint.
public LinearConstraint ( IObjectiveFunction function, Expression constraint ) : System
function IObjectiveFunction The objective function to which this /// constraint refers to.
constraint Expression A specifying /// this constraint in the form of a lambda expression.
return System

LinearConstraint() public method

Constructs a new linear constraint.
public LinearConstraint ( IObjectiveFunction function, string constraint ) : System
function IObjectiveFunction The objective function to which /// this constraint refers to.
constraint string A /// specifying this constraint, such as "ax + b = c".
return System

LinearConstraint() public method

Constructs a new linear constraint.
public LinearConstraint ( IObjectiveFunction function, string constraint, CultureInfo format ) : System
function IObjectiveFunction The objective function to which /// this constraint refers to.
constraint string A /// specifying this constraint, such as "ax + b = c".
format System.Globalization.CultureInfo The culture information specifying how /// numbers written in the should /// be parsed. Default is CultureInfo.InvariantCulture.
return System

LinearConstraint() public method

Constructs a new linear constraint.
public LinearConstraint ( int numberOfVariables ) : System
numberOfVariables int The number of variables in the constraint.
return System

TryParse() public static method

Attempts to create a LinearConstraint from a System.String representation.
public static TryParse ( string str, CultureInfo culture, IObjectiveFunction function, LinearConstraint &constraint ) : bool
str string The string containing the constraint in textual form.
culture System.Globalization.CultureInfo The culture information specifying how /// numbers written in the should /// be parsed. Default is CultureInfo.InvariantCulture.
function IObjectiveFunction The objective function to which this constraint refers to.
constraint LinearConstraint The resulting constraint, if it could be parsed.
return bool

TryParse() public static method

Attempts to create a LinearConstraint from a System.String representation.
public static TryParse ( string str, IObjectiveFunction function, LinearConstraint &constraint ) : bool
str string The string containing the constraint in textual form.
function IObjectiveFunction The objective function to which this constraint refers to.
constraint LinearConstraint The resulting constraint, if it could be parsed.
return bool