C# Класс Accord.Math.Optimization.LinearConstraint

Constraint with only linear terms.
Наследование: IConstraint
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

GetViolation() публичный Метод

Gets how much the constraint is being violated.
public GetViolation ( double input ) : double
input double The function point.
Результат double

IsViolated() публичный Метод

Gets whether this constraint is being violated (within the current tolerance threshold).
public IsViolated ( double input ) : bool
input double The function point.
Результат bool

LinearConstraint() публичный Метод

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.
Результат System

LinearConstraint() публичный Метод

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".
Результат System

LinearConstraint() публичный Метод

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.
Результат System

LinearConstraint() публичный Метод

Constructs a new linear constraint.
public LinearConstraint ( int numberOfVariables ) : System
numberOfVariables int The number of variables in the constraint.
Результат System

TryParse() публичный статический Метод

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.
Результат bool

TryParse() публичный статический Метод

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.
Результат bool