/ Returns true if @c other lies completely within @c bb.
335286
function(bb, other)
{
    return (bb.l <= other.l && bb.r >= other.r && bb.b <= other.b && bb.t >= other.t);
}
315588
boolean isBetterThanOrEqualTo(State other) {
    int newModeBitCount = this.bitCount + (HighLevelEncoder.LATCH_TABLE[this.mode][other.mode] >> 16);
    if (this.binaryShiftByteCount < other.binaryShiftByteCount) {
      // add additional B/S encoding cost of other, if any
      newModeBitCount += calculateBinaryShiftCost(other) - calculateBinaryShiftCost(this);
    } else if (this.binaryShiftByteCount > other.binaryShiftByteCount && other.binaryShiftByteCount > 0) {
      // maximum possible additional cost (we end up exceeding the 31 byte boundary and other state can stay beneath it)
      newModeBitCount += 10; 
    }
    return newModeBitCount <= other.bitCount;
  }
372495
def contains(self, x, y) -> bool:
        "
        if x < self._left or x > self._right or y < self._top or y > self._bottom:
            return False
        return True
540648
public boolean contains(Envelope2D other) {// Note: Will return False, if
												// either envelope is empty.
		return other.xmin >= xmin && other.xmax <= xmax && other.ymin >= ymin
				&& other.ymax <= ymax;
	}
205882
function isInsideBounding(p, bb) {
        if (
            p[0] < bb[0][0] ||
            p[1] < bb[0][1] ||
            p[0] > bb[1][0] ||
            p[1] > bb[1][1]
        ) {
            return false;
        }
        return true;
    }
1352782
private static boolean hasCommonAtom(IBond bondA, IBond bondB) {
        return bondA.contains(bondB.getBegin()) || bondA.contains(bondB.getEnd());
    }
138087
function containsNodeOrEqual(outerNode, innerNode) {
    return outerNode.range[0] <= innerNode.range[0] && outerNode.range[1] >= innerNode.range[1]
}
1270492
public boolean isIntersectingNE(Envelope2D other) {
		return ((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
	}
553533
private static boolean crosses_(String scl, int dim_a, int dim_b) {
		if (dim_a > dim_b) {
			// Valid for area-Line, area-Point, Line-Point
			if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
					&& scl.charAt(2) == '*' && scl.charAt(3) == '*'
					&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
					&& scl.charAt(6) == 'T' && scl.charAt(7) == '*'
					&& scl.charAt(8) == '*')
				return true;

			return false;
		}

		if (dim_a == 1 && dim_b == 1) {
			// Valid for Line-Line
			if (scl.charAt(0) == '0' && scl.charAt(1) == '*'
					&& scl.charAt(2) == '*' && scl.charAt(3) == '*'
					&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
					&& scl.charAt(6) == '*' && scl.charAt(7) == '*'
					&& scl.charAt(8) == '*')
				return true;
		}

		return false;
	}
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;
	}
787515
boolean containsExclusive(Envelope2D other) {
		// Note: This will return False, if either envelope is empty, thus no
		// need to call is_empty().
		return other.xmin > xmin && other.xmax < xmax && other.ymin > ymin
				&& other.ymax < ymax;
	}
967606
public boolean followsOrEqualsForAllOffsetTypesInBoth(final OffsetGroup other) {
    return charOffset().followsOrEquals(other.charOffset())
        && edtOffset().followsOrEquals(other.edtOffset())
        && (!byteOffset().isPresent() || !other.byteOffset().isPresent()
                || byteOffset().get().followsOrEquals(other.byteOffset().get()))
        && (!asrTime().isPresent() || !other.asrTime().isPresent()
                || asrTime().get().followsOrEquals(other.asrTime().get()));
  }
1340328
private static boolean isContainedIn(CQIE cq1, CQIE cq2) {
        if (!cq2.getHead().equals(cq1.getHead()))
            return false;

        for (Function atom : cq2.getBody())
            if (!cq1.getBody().contains(atom))
                return false;

        return true;
    }
29534
def containsbb_exclusive(self, x):
        
        left, bottom, right, top = self.aarect().lbrt()
        leftx, bottomx, rightx, topx = x.aarect().lbrt()
        return (left <= leftx) and (bottom <= bottomx) and (right >= rightx) and (top >= topx) and\
               (not ((left == leftx) and (bottom == bottomx) and (right == rightx) and (top == topx)))
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
	}
192789
public boolean containsAll(Collection<?> c) {
        int n = c.size();
        final Iterator<?> i = c.iterator();
        while (n-- != 0)
            if (!contains(i.next())) return false;
        return true;
    }
1256904
public boolean isOverElement(int absLeft, int absTop) {

        if ((absTop > m_top) && (absTop < (m_top + m_height)) && (absLeft > m_left) && (absLeft < (m_left + m_width))) {
            return true;
        }
        /*     */
        return false;
    }