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

Constraint with only linear terms.
Показать файл Открыть проект

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

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

NonlinearConstraint ( IObjectiveFunction objective, Expression function, ConstraintType shouldBe, double value, Expression gradient = null, double withinTolerance = DEFAULT_TOL ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( IObjectiveFunction objective, bool>.Expression constraint ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( IObjectiveFunction objective, double>.Func function ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, ConstraintType shouldBe, double value ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient, double withinTolerance = DEFAULT_TOL ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, double[]>.Func gradient ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( int numberOfVariables, bool>.Expression constraint ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( int numberOfVariables, double>.Func function ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( int numberOfVariables, double>.Func function, ConstraintType shouldBe, double value ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( int numberOfVariables, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient, double withinTolerance = DEFAULT_TOL ) : System

Constructs a new nonlinear constraint.

NonlinearConstraint ( int numberOfVariables, double>.Func function, double[]>.Func gradient, ConstraintType shouldBe = ConstraintType.GreaterThanOrEqualTo, double value, double withinTolerance = DEFAULT_TOL ) : System

Constructs a new nonlinear constraint.

ToString ( ) : string

Returns a System.String that represents this instance.

ToString ( string format, IFormatProvider formatProvider ) : string

Returns a System.String that represents this instance.

Защищенные методы

Метод Описание
Create ( int numberOfVariables, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient, double tolerance ) : void

Creates a nonlinear constraint.

NonlinearConstraint ( ) : System

Creates an empty nonlinear constraint.

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

Метод Описание
parse ( bool>.Expression constraint, double>.Func &function, ConstraintType &shouldBe, double &value ) : void

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

Create() защищенный Метод

Creates a nonlinear constraint.
protected Create ( int numberOfVariables, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient, double tolerance ) : void
numberOfVariables int
function double>.Func
shouldBe ConstraintType
value double
gradient double[]>.Func
tolerance double
Результат 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

NonlinearConstraint() защищенный Метод

Creates an empty nonlinear constraint.
protected NonlinearConstraint ( ) : System
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, Expression function, ConstraintType shouldBe, double value, Expression gradient = null, double withinTolerance = DEFAULT_TOL ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
function Expression A lambda expression defining the left hand side of the constraint equation.
shouldBe ConstraintType How the left hand side of the constraint /// should be compared to the given .
value double The right hand side of the constraint equation.
gradient Expression A lambda expression defining the gradient of the /// left hand side of the constraint equation.
withinTolerance double The tolerance for violations of the constraint. Equality /// constraints should set this to a small positive value. Default is 1e-8.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, bool>.Expression constraint ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
constraint bool>.Expression A boolean lambda expression expressing the constraint. Please /// see examples for details.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, double>.Func function ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
function double>.Func A lambda expression defining the left hand side of the constraint.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, ConstraintType shouldBe, double value ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
function double>.Func A lambda expression defining the left hand side of the /// constraint equation.
shouldBe ConstraintType How the left hand side of the constraint should be /// compared to the given .
value double The right hand side of the constraint equation. Default is 0.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
function double>.Func A lambda expression defining the left hand side of the /// constraint equation.
shouldBe ConstraintType How the left hand side of the constraint should be /// compared to the given .
value double The right hand side of the constraint equation. Default is 0.
gradient double[]>.Func A lambda expression defining the gradient of the /// left hand side of the constraint equation.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient, double withinTolerance = DEFAULT_TOL ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
function double>.Func A lambda expression defining the left hand side of the constraint equation.
shouldBe ConstraintType How the left hand side of the constraint should be compared to the given .
value double The right hand side of the constraint equation. Default is 0.
gradient double[]>.Func A lambda expression defining the gradient of the /// left hand side of the constraint equation.
withinTolerance double The tolerance for violations of the constraint. Equality /// constraints should set this to a small positive value. Default is 1e-8.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( IObjectiveFunction objective, double>.Func function, double[]>.Func gradient ) : System
objective IObjectiveFunction The objective function to which this constraint refers.
function double>.Func A lambda expression defining the left hand side of the /// constraint equation.
gradient double[]>.Func A lambda expression defining the gradient of the /// left hand side of the constraint equation..
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( int numberOfVariables, bool>.Expression constraint ) : System
numberOfVariables int The number of variables in the constraint.
constraint bool>.Expression A boolean lambda expression expressing the constraint. Please /// see examples for details.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( int numberOfVariables, double>.Func function ) : System
numberOfVariables int The number of variables in the constraint.
function double>.Func A lambda expression defining the left hand side of the /// constraint equation.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( int numberOfVariables, double>.Func function, ConstraintType shouldBe, double value ) : System
numberOfVariables int The number of variables in the constraint.
function double>.Func A lambda expression defining the left hand side of the constraint equation.
shouldBe ConstraintType How the left hand side of the constraint should be compared to /// the given . Default is .
value double The right hand side of the constraint equation. Default is 0.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( int numberOfVariables, double>.Func function, ConstraintType shouldBe, double value, double[]>.Func gradient, double withinTolerance = DEFAULT_TOL ) : System
numberOfVariables int The number of variables in the constraint.
function double>.Func A lambda expression defining the left hand side of the constraint equation.
shouldBe ConstraintType How the left hand side of the constraint should be compared to the given .
value double The right hand side of the constraint equation. Default is 0.
gradient double[]>.Func A lambda expression defining the gradient of the /// left hand side of the constraint equation.
withinTolerance double The tolerance for violations of the constraint. Equality /// constraints should set this to a small positive value. Default is 1e-8.
Результат System

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

Constructs a new nonlinear constraint.
public NonlinearConstraint ( int numberOfVariables, double>.Func function, double[]>.Func gradient, ConstraintType shouldBe = ConstraintType.GreaterThanOrEqualTo, double value, double withinTolerance = DEFAULT_TOL ) : System
numberOfVariables int The number of variables in the constraint.
function double>.Func A lambda expression defining the left hand side of the /// constraint equation.
gradient double[]>.Func A lambda expression defining the gradient of the /// left hand side of the constraint equation.
shouldBe ConstraintType How the left hand side of the constraint should be /// compared to the given .
value double The right hand side of the constraint equation. Default is 0.
withinTolerance double The tolerance for violations of the constraint. Equality /// constraints should set this to a small positive value. Default is 1e-8.
Результат System

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

Returns a System.String that represents this instance.
public ToString ( ) : string
Результат string

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

Returns a System.String that represents this instance.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string The format.
formatProvider IFormatProvider The format provider.
Результат string