示例#1
0
        public static RangeSet operator -(RangeSet R, double delta)
        {
            RangeSet s = new RangeSet();

            foreach (var r in R)
            {
                s.Add(r - delta);
            }

            return(s);
        }
示例#2
0
        public static RangeSet operator *(RangeSet R1, IEnumerable <RangeSet> L)
        {
            RangeSet R = R1;

            foreach (var R2 in L)
            {
                R *= R2;
            }

            return(R);
        }
示例#3
0
        public bool Overlapped(RangeSet R)
        {
            foreach (var r in R)
            {
                if (this.Overlapped(r))
                {
                    return(true);
                }
            }

            return(false);
        }
示例#4
0
        public static RangeSet operator *(RangeSet R, Range range)
        {
            RangeSet list = new RangeSet();

            foreach (var r in R)
            {
                if (r.Overlapped(range))
                {
                    list.Add(r * range);
                }
            }

            return(list);
        }
示例#5
0
        public static RangeSet operator *(RangeSet R1, RangeSet R2)
        {
            RangeSet R = new RangeSet();

            foreach (var r2 in R2)
            {
                RangeSet S = R1 * r2;
                foreach (var s in S)
                {
                    R.Add(s);
                }
            }

            return(R);
        }