Пример #1
0
 public VariableVector Restrict([CanBeNull] VariableVector lowerBound, [CanBeNull] VariableVector upperBound)
 {
     if (upperBound != null)
     {
         AtLeastConstraint.CreateAtLeastConstraint(upperBound._x, _x);
         AtLeastConstraint.CreateAtLeastConstraint(upperBound._y, _y);
     }
     return(Restrict(lowerBound));
 }
Пример #2
0
 public VariableVector Restrict([CanBeNull] VariableVector lowerBound)
 {
     if (lowerBound != null)
     {
         AtLeastConstraint.CreateAtLeastConstraint(_x, lowerBound._x);
         AtLeastConstraint.CreateAtLeastConstraint(_y, lowerBound._y);
     }
     return(this);
 }
Пример #3
0
 /// <summary>
 /// The variable's maximum is restricted to the (eventual) value of another variable.
 /// </summary>
 /// <returns><c>this</c></returns>
 public NumericVariable Max(NumericVariable value)
 {
     AtLeastConstraint.CreateAtLeastConstraint(value, this);
     return(this);
 }
Пример #4
0
 /// <summary>
 /// The variable's minimum is restricted to the (eventual) value of another variable.
 /// </summary>
 /// <returns><c>this</c></returns>
 public NumericVariable Min(NumericVariable value)
 {
     AtLeastConstraint.CreateAtLeastConstraint(this, value);
     return(this);
 }