Does this network segment overlap with another?

 @param other_segment[JSS::NetworkSegment] the other segment to check

 @return [Boolean] Does the other segment overlap this one?
506646
def overlap?(other_segment)
      raise TypeError, 'Argument must be a JSS::NetworkSegment' unless \
        other_segment.is_a? JSS::NetworkSegment
      other_range = other_segment.range
      range.include?(other_range.begin) || range.include?(other_range.end)
    end
404706
def check_node_overlap!
      node_to_positions = {}
      each_node do |node|
        node.proper_range.each do |position|
          if node_to_positions[position]
            already = node_to_positions[position]
            puts "There is a proper_range overlap between #{node} and #{already}"
            puts "Overlapping: #{already.proper_range & node.proper_range}"
            binding.pry
          end
          node_to_positions[position] = node
        end
      end
    end
779686
def intersection(self, *others):
        
        return self.copy(super(NGram, self).intersection(*others))
633064
public boolean intersectsWith(Range other) {
        return !other.isEmpty() && !this.isEmpty() &&
                (this.contains(other.lower) || other.contains(this.lower)
                        || (other.upper > upper && other.lower < lower));
    }
919876
public boolean intersect(Envelope3D other) {
		if (isEmpty() || other.isEmpty())
			return false;

		if (other.xmin > xmin)
			xmin = other.xmin;

		if (other.xmax < xmax)
			xmax = other.xmax;

		if (other.ymin > ymin)
			ymin = other.ymin;

		if (other.ymax < ymax)
			ymax = other.ymax;

		if (other.zmin > zmin)
			zmin = other.zmin;

		if (other.zmax < zmax)
			zmax = other.zmax;

		boolean bIntersecting = xmin <= xmax && ymin <= ymax && zmin <= zmax;

		if (!bIntersecting)
			setEmpty();

		return bIntersecting;
	}
563959
def overlap(self, other: 'Span'):
        """"""
        return not (
            # if one rectangle is left of other
            other.column_end <= self.column_start
            or self.column_end <= other.column_start
            # if one rectangle is above other
            or other.row_end <= self.row_start
            or self.row_end <= other.row_start
        )
1053439
def is_subset(self, other):
		
		if isinstance(other, _basebag):
			for elem, count in self.counts():
				if not count <= other.count(elem):
					return False
		else:
			for elem in self:
				if self.count(elem) > 1 or elem not in other:
					return False
		return True
1233369
public final boolean overlaps(@NotNull final HourRanges other) {
        final BitSet thisMinutes = this.toMinutes();
        final BitSet otherMinutes = other.toMinutes();
        thisMinutes.and(otherMinutes);
        return !thisMinutes.isEmpty();
    }
526104
def intersects_segment(self, seg):
		
		return any(value.intersects_segment(seg) for value in self.itervalues())
834895
def _overlapping(files):
    
    segments = set()
    for path in files:
        seg = file_segment(path)
        for s in segments:
            if seg.intersects(s):
                return True
        segments.add(seg)
    return False
182149
def intersect(self, other):
        
        if not self.overlap(other):
            return None

        newstart = max(self._start, other.start)
        newend = min(self._end, other.end)
        return Range(newstart, newend)
452070
public final boolean overlaps(@NotNull final HourRange other) {
        Contract.requireArgNotNull("other", other);
        if (this.equals(other)) {
            return true;
        }
        final int otherFrom = other.from.toMinutes();
        final int thisFrom = from.toMinutes();
        final int otherTo = other.to.toMinutes();
        final int thisTo = to.toMinutes();
        if (otherFrom <= thisTo && otherFrom >= thisFrom) {
            return true;
        }
        if (otherTo <= thisTo && otherTo >= thisFrom) {
            return true;
        }
        if (thisFrom <= otherTo && thisFrom >= otherFrom) {
            return true;
        }
        return (thisTo <= otherTo && thisTo >= otherFrom);
    }
1061419
@Override
    public boolean overlaps(Range<T> other) {
        dbc.precondition(other != null, "checking for overlaps between a DenseRange<T> and null");
        if (other instanceof DenseRange == false) {
            return other.overlaps(this);
        }
        return !Order.of(comparator, Optional.of(this.begin()), other.end()).isGte() && !Order.of(comparator, Optional.of(other.begin()), this.end()).isGte();
    }
952211
public int getOverlapLength(HmmerResult other){

		int overlap = 0;
		for ( HmmerDomain d1 : getDomains()){
			for (HmmerDomain d2 : other.getDomains()){
				overlap += getOverlap(d1, d2);
			}
		}
		return overlap;

	}
1302192
def intersection(other)
      if other.is_a?(AbsoluteSet) and other.universe.eql?(@universe)
        copy(:mask => @mask & other.mask)
      elsif other.is_a?(AbstractSet) and other.infinite?
        other.intersection(self)
      else
        copy(:mask => @mask & as_mask(other, false))
      end
    end
1134589
public boolean isIntersecting(Envelope3D other) {
		return !isEmpty() && !other.isEmpty() && ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) && // check that x projections overlap
			((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin) && // check that y projections overlap
			((zmin <= other.zmin) ? zmax >= other.zmin : other.zmax >= zmin); // check that z projections overlap
	}
469405
public boolean canMergeRemainder(CompositeScore<S> other) {
        return getFilteringScore().canMergeRemainderFilter(other.getFilteringScore())
            && getOrderingScore().canMergeRemainderOrdering(other.getOrderingScore());
    }