| LinearConstraint(DoubleVector, Double, ConstraintType, Double) Constructor |
Constructs a LinearConstraint object from the given
parameters.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public LinearConstraint(
DoubleVector coefficients,
double rightHandSide,
ConstraintType ctype,
double tolerance
)
Public Sub New (
coefficients As DoubleVector,
rightHandSide As Double,
ctype As ConstraintType,
tolerance As Double
)
public:
LinearConstraint(
DoubleVector^ coefficients,
double rightHandSide,
ConstraintType ctype,
double tolerance
)
new :
coefficients : DoubleVector *
rightHandSide : float *
ctype : ConstraintType *
tolerance : float -> LinearConstraint
Parameters
- coefficients DoubleVector
- Linear combination coefficients.
- rightHandSide Double
- The right hand side of the constraint.
- ctype ConstraintType
- The constraint type.
- tolerance 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
See Also