private BoxConstraint Add(LowerBound bound) { LowerBound newLowerBound = this.lowerBound.Tighten(bound); if (newLowerBound == this.lowerBound) { return this; } return this.ToBuilder().WithLowerBound(newLowerBound).Build(); }
public BoxConstraint(int position, LowerBound lb, UpperBound ub) { if (lb == null || ub == null) { throw new ArgumentNullException("Bounds cannot be null."); } this.lowerBound = lb; this.upperBound = ub; this.position = position; }
public Builder WithLowerBound(LowerBound lb) { this.LowerBound = lb; return this; }
public Builder WithLowerBound(LowerBound lb) { this.LowerBound = lb; return(this); }