Constructs a LinearConstraint object from the given
parameters.
Namespace:
CenterSpace.NMath.AnalysisAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public LinearConstraint( DoubleVector coefficients, double rightHandSide, ConstraintType ctype, double tolerance ) |
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ coefficients As DoubleVector, _ rightHandSide As Double, _ ctype As ConstraintType, _ tolerance As Double _ ) |
| Visual C++ |
|---|
public: LinearConstraint( DoubleVector^ coefficients, double rightHandSide, ConstraintType ctype, double tolerance ) |
Parameters
- coefficients
- Type: CenterSpace.NMath.Core..::.DoubleVector
Linear combination coefficients.
- rightHandSide
- Type: System..::.Double
The right hand side of the constraint.
- ctype
- Type: CenterSpace.NMath.Analysis..::.ConstraintType
The constraint type.
- tolerance
- Type: System..::.Double
The tolerance for determining whether or not this constraint is satisfied at a particular point. For example the equality constraint c(x) = 0 will be considered to be satisfied at a point x0 if |c(x0)| < Tolerance, and a inequality constraint c(x) >= 0 will be considered to be satisfied at a point x0 if c(x0) >= -tolerance_.
Remarks
If the constaint type given is ConstraintType.Inequality,
and the the independent variable is given by the vector x, then the
constructed constraint would be
coefficients[0]*x[0] + coefficients[1]*x[1] +...+ coefficients[n]*x[n] - rightHandSide >= 0