Example #1
0
        private BoxConstraint Add(LowerBound bound)
        {
            LowerBound newLowerBound = this.lowerBound.Tighten(bound);

            if (newLowerBound == this.lowerBound)
            {
                return this;
            }

            return this.ToBuilder().WithLowerBound(newLowerBound).Build();
        }
Example #2
0
        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;
        }
Example #3
0
            public Builder WithLowerBound(LowerBound lb)
            {
                this.LowerBound = lb;

                return this;
            }
Example #4
0
            public Builder WithLowerBound(LowerBound lb)
            {
                this.LowerBound = lb;

                return(this);
            }