Example #1
0
        /// <inheritdoc />
        public TSet Plus(IIntervalSet <T> other)
        {
            List <Boundary <T> > plusBoundaries = PlusBoundaries(this, other).Concat(PlusBoundaries(other, this)).ToList();

            return(Builder.MakeSet(Builder.Build(plusBoundaries, ContainsNegativeInfinity() || other.ContainsNegativeInfinity()).ToList()));
        }
Example #2
0
        /// <inheritdoc />
        public TSet Cross(IIntervalSet <T> other)
        {
            List <Boundary <T> > crossBoundaries = CrossBoundaries(this, other).Concat(CrossBoundaries(other, this)).ToList();

            return(Builder.MakeSet(Builder.Build(crossBoundaries, ContainsNegativeInfinity() && other.ContainsNegativeInfinity()).ToList()));
        }
 /// <summary>
 /// Initializes a new <see cref="MultipleIntervalSet{TSet,TBuilder,TInterval,T}"/> based on a given <see cref="IIntervalSet{T}"/>
 /// </summary>
 /// <param name="set"></param>
 protected MultipleIntervalSet(IIntervalSet <T> set) : this()
 {
     _intervalList = Builder.Build(set.Boundaries.ToList(), set.ContainsNegativeInfinity()).ToList();
 }