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)); }
public VariableVector Restrict([CanBeNull] VariableVector lowerBound) { if (lowerBound != null) { AtLeastConstraint.CreateAtLeastConstraint(_x, lowerBound._x); AtLeastConstraint.CreateAtLeastConstraint(_y, lowerBound._y); } return(this); }
/// <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); }
/// <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); }