test_class.file: singa-mathematics/src/test/java/bio/singa/mathematics/intervals/IntegerIntervalTest.java
test_class.identifier: IntegerIntervalTest
test_case.body: @Test
      void intersectionTest() {
          IntegerInterval a = IntegerInterval.of(10,20);
          IntegerInterval b = IntegerInterval.of(30,40);
          assertNull(a.intersection(b));
          assertNull(b.intersection(a));
  
          IntegerInterval c = IntegerInterval.of(15,25);
          assertEquals(IntegerInterval.of(15,20), c.intersection(a));
          assertEquals(IntegerInterval.of(15,20), a.intersection(c));
  
          IntegerInterval d = IntegerInterval.of(0, 30);
          assertEquals(a, d.intersection(a));
          assertEquals(a, a.intersection(d));
  
          assertEquals(IntegerInterval.of(30), b.intersection(d));
      }
test_case.class_method_signature: IntegerIntervalTest.intersectionTest()
test_case.full_signature: @Test void intersectionTest()
test_case.identifier: intersectionTest
test_case.invocations: of of assertNull intersection assertNull intersection of assertEquals of intersection assertEquals of intersection of assertEquals intersection assertEquals intersection assertEquals of intersection
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void intersectionTest()
focal_class.declarator: distance = new OverlapDistance()
focal_class.modifier: private static
focal_class.original_string: private static OverlapDistance distance = new OverlapDistance();
focal_class.type: OverlapDistance
focal_class.var_name: distance
focal_class.file: singa-mathematics/src/main/java/bio/singa/mathematics/intervals/IntegerInterval.java
focal_class.identifier: IntegerInterval
focal_class.interfaces: implements Ring<IntegerInterval>, Metrizable<IntegerInterval>
focal_class.class_method_signature: IntegerInterval.IntegerInterval(Integer lowerBound, Integer upperBound)
focal_class.full_signature: public  IntegerInterval(Integer lowerBound, Integer upperBound)
focal_class.identifier: IntegerInterval
focal_class.modifiers: public
focal_class.parameters: (Integer lowerBound, Integer upperBound)
focal_class.signature:  IntegerInterval(Integer lowerBound, Integer upperBound)
focal_class.class_method_signature: IntegerInterval.of(int lowerBound, int upperBound)
focal_class.full_signature: public static IntegerInterval of(int lowerBound, int upperBound)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (int lowerBound, int upperBound)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval of(int lowerBound, int upperBound)
focal_class.class_method_signature: IntegerInterval.of(int bond)
focal_class.full_signature: public static IntegerInterval of(int bond)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (int bond)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval of(int bond)
focal_class.class_method_signature: IntegerInterval.minMax(int first, int second, int third, int fourth)
focal_class.full_signature: private static int[] minMax(int first, int second, int third, int fourth)
focal_class.identifier: minMax
focal_class.modifiers: private static
focal_class.parameters: (int first, int second, int third, int fourth)
focal_class.return: int[]
focal_class.signature: int[] minMax(int first, int second, int third, int fourth)
focal_class.class_method_signature: IntegerInterval.determineConsecutiveRanges(Collection<Integer> integers)
focal_class.full_signature: public static List<IntegerInterval> determineConsecutiveRanges(Collection<Integer> integers)
focal_class.identifier: determineConsecutiveRanges
focal_class.modifiers: public static
focal_class.parameters: (Collection<Integer> integers)
focal_class.return: List<IntegerInterval>
focal_class.signature: List<IntegerInterval> determineConsecutiveRanges(Collection<Integer> integers)
focal_class.class_method_signature: IntegerInterval.add(IntegerInterval summand)
focal_class.full_signature: @Override public IntegerInterval add(IntegerInterval summand)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (IntegerInterval summand)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval add(IntegerInterval summand)
focal_class.class_method_signature: IntegerInterval.additivelyInvert()
focal_class.full_signature: @Override public IntegerInterval additivelyInvert()
focal_class.identifier: additivelyInvert
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval additivelyInvert()
focal_class.class_method_signature: IntegerInterval.multiply(IntegerInterval multiplicand)
focal_class.full_signature: @Override public IntegerInterval multiply(IntegerInterval multiplicand)
focal_class.identifier: multiply
focal_class.modifiers: @Override public
focal_class.parameters: (IntegerInterval multiplicand)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval multiply(IntegerInterval multiplicand)
focal_class.class_method_signature: IntegerInterval.subtract(IntegerInterval subtrahend)
focal_class.full_signature: @Override public IntegerInterval subtract(IntegerInterval subtrahend)
focal_class.identifier: subtract
focal_class.modifiers: @Override public
focal_class.parameters: (IntegerInterval subtrahend)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval subtract(IntegerInterval subtrahend)
focal_class.class_method_signature: IntegerInterval.intersection(IntegerInterval range)
focal_class.full_signature: public IntegerInterval intersection(IntegerInterval range)
focal_class.identifier: intersection
focal_class.modifiers: public
focal_class.parameters: (IntegerInterval range)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval intersection(IntegerInterval range)
focal_class.class_method_signature: IntegerInterval.union(IntegerInterval range)
focal_class.full_signature: public IntegerInterval union(IntegerInterval range)
focal_class.identifier: union
focal_class.modifiers: public
focal_class.parameters: (IntegerInterval range)
focal_class.return: IntegerInterval
focal_class.signature: IntegerInterval union(IntegerInterval range)
focal_class.class_method_signature: IntegerInterval.distanceTo(IntegerInterval another)
focal_class.full_signature: @Override public double distanceTo(IntegerInterval another)
focal_class.identifier: distanceTo
focal_class.modifiers: @Override public
focal_class.parameters: (IntegerInterval another)
focal_class.return: double
focal_class.signature: double distanceTo(IntegerInterval another)
focal_class.class_method_signature: IntegerInterval.distanceTo(IntegerInterval another, Metric<IntegerInterval> metric)
focal_class.full_signature: @Override public double distanceTo(IntegerInterval another, Metric<IntegerInterval> metric)
focal_class.identifier: distanceTo
focal_class.modifiers: @Override public
focal_class.parameters: (IntegerInterval another, Metric<IntegerInterval> metric)
focal_class.return: double
focal_class.signature: double distanceTo(IntegerInterval another, Metric<IntegerInterval> metric)
focal_class.class_method_signature: IntegerInterval.size()
focal_class.full_signature: public int size()
focal_class.identifier: size
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.superclass: extends Range<Integer>
focal_method.body: public IntegerInterval intersection(IntegerInterval range) {
          int thisLow = getLowerBound();
          int thisUp = getUpperBound();
          int thatLow = range.getLowerBound();
          int thatUp = range.getUpperBound();
          // they are equal
          if (equals(range)) {
              return new IntegerInterval(thisLow, thisUp);
          }
          int low = Math.max(thisLow, thatLow);
          int up = Math.min(thisUp, thatUp);
          if (low > up) {
              return null;
          } else {
              return new IntegerInterval(low, up);
          }
      }
focal_method.class_method_signature: IntegerInterval.intersection(IntegerInterval range)
focal_method.full_signature: public IntegerInterval intersection(IntegerInterval range)
focal_method.identifier: intersection
focal_method.invocations: getLowerBound getUpperBound getLowerBound getUpperBound equals max min
focal_method.modifiers: public
focal_method.parameters: (IntegerInterval range)
focal_method.return: IntegerInterval
focal_method.signature: IntegerInterval intersection(IntegerInterval range)