Does this interval intersect that one?

@return true, if intervals share at least one point
426239
public boolean intersects(Interval1D<V> other) {
    if (other.hi.compareTo(this.lo) < 0) {
      return false;
    }
    if (this.hi.compareTo(other.lo) < 0) {
      return false;
    }

    return true;
  }
168663
def has_intersection(self, other):
        
        return bool(lib.SDL_HasIntersection(self._ptr, other._ptr))
139219
boolean intersects(LongBitSet other) {
		// Depends on the ghost bits being clear!
		int pos = Math.min(numWords, other.numWords);
		while (--pos >= 0) {
			if ((bits[pos] & other.bits[pos]) != 0)
				return true;
		}
		return false;
	}
1324058
public boolean intersects(Iterable<Range<T>> ranges)
    {
        for (Range<T> range2 : ranges)
        {
            if (range2.intersects(this))
                return true;
        }
        return false;
    }
488999
public boolean hasSpansIntersecting(int start, int end) {
        for (int i = 0; i < numberOfSpans; i++) {
            // equal test is valid since both intervals are not empty by construction
            if (spanStarts[i] >= end || spanEnds[i] <= start) continue;
            return true;
        }
        return false;
    }
339923
public boolean intersects(Geometry geometry) {
		if (geometry == null) {
			return false;
		}
		Coordinate[] arr1 = getCoordinates();
		Coordinate[] arr2 = geometry.getCoordinates();
		for (int i = 0; i < arr1.length - 1; i++) {
			for (int j = 0; j < arr2.length - 1; j++) {
				if (Mathlib.lineIntersects(arr1[i], arr1[i + 1], arr2[j], arr2[j + 1])) {
					return true;
				}
			}
		}
		return false;
	}
1116350
@Override
  public boolean intersects(IVersionRange yourRange)
  {
    // The set has explicit versions, so just check these against the supplied range
    for (IVersion version : set) {
      if (yourRange.contains(version)) {
        return true;
      }
    }
    return false;
  }
995807
public boolean intersects(LineSegment lineSegment) {
		double x1 = this.x1();
		double y1 = this.y1();
		double x2 = this.x2();
		double y2 = this.y2();
		double x3 = lineSegment.x1();
		double y3 = lineSegment.y1();
		double x4 = lineSegment.x2();
		double y4 = lineSegment.y2();

		double denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
		if (denom == 0) {
			return false;
		}
		double u1 = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom;
		double u2 = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denom;
		return (u1 > 0 && u1 < 1 && u2 > 0 && u2 < 1);
	}
306103
public boolean contains(ChronoInterval<T> interval) {

        // trivial case
        if (interval.isEmpty()) {
            return false;
        }

        T low = interval.getStart().getTemporal();

        if ((low != null) && interval.getStart().isOpen()) {
            low = this.timeLine.stepForward(low);
        }

        List<ChronoInterval<T>> found = new ArrayList<>();
        this.findByEquals(interval, low, found, this.root);
        return !found.isEmpty();

    }
5243
public boolean intersects(final Span s) {
    final int sstart = s.getStart();
    // either s's start is in this or this' start is in s
    return this.contains(s) || s.contains(this)
        || getStart() <= sstart && sstart < getEnd()
        || sstart <= getStart() && getStart() < s.getEnd();
  }
31251
public boolean isIntervalComparable(Interval<E> other)
  {
    int flags = getRelationFlags(other);
    if (checkMultipleBitSet(flags & REL_FLAGS_INTERVAL_UNKNOWN)) {
      return false;
    }
    return checkFlagSet(flags, REL_FLAGS_INTERVAL_BEFORE) || checkFlagSet(flags, REL_FLAGS_INTERVAL_AFTER);
  }
1193600
public boolean intersect(double tolerance, boolean b_intersecting) {
		if (m_input_segments.size() != 2)
			throw GeometryException.GeometryInternalError();

		m_tolerance = tolerance;
		double small_tolerance_sqr = MathUtils.sqr(tolerance * 0.01);
		boolean bigmove = false;
		
		IntersectionPart part1 = m_input_segments.get(0);
		IntersectionPart part2 = m_input_segments.get(1);
		if (b_intersecting
				|| (part1.seg._isIntersecting(part2.seg, tolerance, true) & 5) != 0) {
			if (part1.seg.getType().value() == Geometry.GeometryType.Line) {
				Line line_1 = (Line) part1.seg;
				if (part2.seg.getType().value() == Geometry.GeometryType.Line) {
					Line line_2 = (Line) part2.seg;
					int count = Line._intersectLineLine(line_1, line_2, null,
							m_param_1, m_param_2, tolerance);
					if (count == 0) {
						assert (count > 0);
						throw GeometryException.GeometryInternalError();
					}
					Point2D[] points = new Point2D[9];
					for (int i = 0; i < count; i++) {
						// For each point of intersection, we calculate a
						// weighted point
						// based on the ranks and weights of the endpoints and
						// the interior.
						double t1 = m_param_1[i];
						double t2 = m_param_2[i];
						int rank1 = part1.rank_interior;
						double weight1 = 1.0;

						if (t1 == 0) {
							rank1 = part1.rank_start;
							weight1 = part1.weight_start;
						} else if (t1 == 1.0) {
							rank1 = part1.rank_end;
							weight1 = part1.weight_end;
						}

						int rank2 = part2.rank_interior;
						double weight2 = 1.0;
						if (t2 == 0) {
							rank2 = part2.rank_start;
							weight2 = part2.weight_start;
						} else if (t2 == 1.0) {
							rank2 = part2.rank_end;
							weight2 = part2.weight_end;
						}

						double ptWeight;

						Point2D pt = new Point2D();
						if (rank1 == rank2) {// for equal ranks use weighted sum
							Point2D pt_1 = new Point2D();
							line_1.getCoord2D(t1, pt_1);
							Point2D pt_2 = new Point2D();
							line_2.getCoord2D(t2, pt_2);
							ptWeight = weight1 + weight2;
							double t = weight2 / ptWeight;
							MathUtils.lerp(pt_1, pt_2, t, pt);
							if (Point2D.sqrDistance(pt, pt_1)
									+ Point2D.sqrDistance(pt, pt_2) > small_tolerance_sqr)
								bigmove = true;
							
						} else {// for non-equal ranks, the higher rank wins
							if (rank1 > rank2) {
								line_1.getCoord2D(t1, pt);
								ptWeight = weight1;
								Point2D pt_2 = new Point2D();
								line_2.getCoord2D(t2, pt_2);
								if (Point2D.sqrDistance(pt, pt_2) > small_tolerance_sqr)
									bigmove = true;
							} else {
								line_2.getCoord2D(t2, pt);
								ptWeight = weight2;
								Point2D pt_1 = new Point2D();
								line_1.getCoord2D(t1, pt_1);
								if (Point2D.sqrDistance(pt, pt_1) > small_tolerance_sqr)
									bigmove = true;
							}
						}
						points[i] = pt;
					}

					// Split the line_1, making sure the endpoints are adusted
					// to the weighted
					double t0 = 0;
					int i0 = -1;
					for (int i = 0; i <= count; i++) {
						double t = i < count ? m_param_1[i] : 1.0;
						if (t != t0) {
							SegmentBuffer seg_buffer = newSegmentBuffer_();
							line_1.cut(t0, t, seg_buffer);
							if (i0 != -1)
								seg_buffer.get().setStartXY(points[i0]);
							if (i != count)
								seg_buffer.get().setEndXY(points[i]);

							t0 = t;
							m_result_segments_1
									.add(newIntersectionPart_(seg_buffer.get()));
						}
						i0 = i;
					}

					int[] indices = new int[9];
					for (int i = 0; i < count; i++)
						indices[i] = i;

					if (count > 1) {
						if (m_param_2[0] > m_param_2[1]) {
							double t = m_param_2[0];
							m_param_2[0] = m_param_2[1];
							m_param_2[1] = t;
							int i = indices[0];
							indices[0] = indices[1];
							indices[1] = i;
						}
					}

					// Split the line_2
					t0 = 0;
					i0 = -1;
					for (int i = 0; i <= count; i++) {
						double t = i < count ? m_param_2[i] : 1.0;
						if (t != t0) {
							SegmentBuffer seg_buffer = newSegmentBuffer_();
							line_2.cut(t0, t, seg_buffer);
							if (i0 != -1) {
								int ind = indices[i0];
								seg_buffer.get().setStartXY(points[ind]);
							}
							if (i != count) {
								int ind = indices[i];
								seg_buffer.get().setEndXY(points[ind]);
							}

							t0 = t;
							m_result_segments_2
									.add(newIntersectionPart_(seg_buffer.get()));
						}
						i0 = i;
					}

					return bigmove;
				}

				throw GeometryException.GeometryInternalError();
			}

			throw GeometryException.GeometryInternalError();
		}
		
		return false;
	}
129814
public static <C extends Comparable> boolean intersect(final Range<C> range0, final Range<C> range1) {
        checkNotNull(range0);
        checkNotNull(range1);
        return range0.isConnected(range1) && !range0.intersection(range1).isEmpty();
    }
943098
private boolean searchAll(Node<K, V> x, Interval1D<K> interval, List<Node<K, V>> toAppend) {
    boolean found1 = false;
    boolean found2 = false;
    boolean found3 = false;
    if (x == null) {
      return false;
    }
    if (interval.intersects(x.interval)) {
      toAppend.add(x);
      found1 = true;
    }

    if (x.left != null && x.left.max.compareTo(interval.lo) >= 0) {
      found2 = searchAll(x.left, interval, toAppend);
    }
    if (found2 || x.left == null || x.left.max.compareTo(interval.lo) < 0) {
      found3 = searchAll(x.right, interval, toAppend);
    }
    return found1 || found2 || found3;
  }
390607
def contains_interval(self, other):
        
        return (
            self.begin <= other.begin and
            self.end >= other.end
        )
179269
def intersectingInterval(self, start, end):
    
    # find all intervals in this node that intersect start and end
    l = []
    for x in self.data.starts:
      xStartsAfterInterval = (x.start > end and not self.openEnded) or \
                             (x.start >= end and self.openEnded)
      xEndsBeforeInterval = (x.end < start and not self.openEnded) or \
                            (x.end <= start and self.openEnded)
      if ((not xStartsAfterInterval) and (not xEndsBeforeInterval)):
        l.append(x)

    # process left subtree (if we have one) if the requested interval begins
    # before mid
    if self.left is not None and start <= self.data.mid:
      l += self.left.intersectingInterval(start, end)

    # process right subtree (if we have one) if the requested interval ends
    # after mid
    if self.right is not None and end >= self.data.mid:
      l += self.right.intersectingInterval(start, end)

    return l
624800
public static final <T> boolean intersect(Collection<Set<T>> sets)
    {
        Set<T> set = intersection(sets);
        return !set.isEmpty();
    }