Exemple #1
0
        public static IntRangeList operator -(IntRangeList list1, IntRangeList list2)
        {
            var newList = new IntRangeList(list1);

            newList.Subtract(list2);
            return(newList);
        }
Exemple #2
0
 private void Add(IntRangeList rangeList)
 {
     foreach (var range in rangeList._ranges)
     {
         Add(range);
     }
 }
Exemple #3
0
        public static IntRangeList operator -(IntRangeList list, Tuple <int, int> range)
        {
            var newList = new IntRangeList(list);

            newList.Subtract(range);
            return(newList);
        }
Exemple #4
0
 private void Subtract(IntRangeList rangeList)
 {
     foreach (var range in rangeList._ranges)
     {
         Subtract(range);
     }
 }
Exemple #5
0
        public static IntRangeList operator +(IntRangeList list1, IntRangeList list2)
        {
            var newList = new IntRangeList(list1);

            newList.Add(list2);
            return(newList);
        }
Exemple #6
0
 public static void Add(this Dictionary<int, IntRangeList> rangeLists0, Dictionary<int, IntRangeList> rangeLists1)
 {
     foreach (int k in rangeLists1.Keys)
     {
         if (!rangeLists0.ContainsKey(k))
         {
             rangeLists0[k] = new IntRangeList();
         }
         rangeLists0[k] += rangeLists1[k];
     }
 }
Exemple #7
0
 public static void Add(this Dictionary <int, IntRangeList> rangeLists0, Dictionary <int, IntRangeList> rangeLists1)
 {
     foreach (int k in rangeLists1.Keys)
     {
         if (!rangeLists0.ContainsKey(k))
         {
             rangeLists0[k] = new IntRangeList();
         }
         rangeLists0[k] += rangeLists1[k];
     }
 }
Exemple #8
0
 private IntRangeList(IntRangeList list)
 {
     _ranges = new List <Tuple <int, int> >(list._ranges);
 }
Exemple #9
0
 public static IntRangeList operator -(IntRangeList list, Tuple<int, int> range)
 {
     var newList = new IntRangeList(list);
     newList.Subtract(range);
     return newList;
 }
Exemple #10
0
 public static IntRangeList operator -(IntRangeList list1, IntRangeList list2)
 {
     var newList = new IntRangeList(list1);
     newList.Subtract(list2);
     return newList;
 }
Exemple #11
0
 public static IntRangeList operator +(IntRangeList list1, IntRangeList list2)
 {
     var newList = new IntRangeList(list1);
     newList.Add(list2);
     return newList;
 }
Exemple #12
0
 private IntRangeList(IntRangeList list)
 {
     _ranges = new List<Tuple<int, int>>(list._ranges);
 }
Exemple #13
0
 private void Subtract(IntRangeList rangeList)
 {
     foreach (var range in rangeList._ranges)
     {
         Subtract(range);
     }
 }
Exemple #14
0
 private void Add(IntRangeList rangeList)
 {
     foreach (var range in rangeList._ranges)
     {
         Add(range);
     }
 }