Checks to see if the frond xy will conflict with a frond on the left side of the embedding.
764180
def __check_left_side_conflict(x, y, dfs_data):
    """"""
    l = dfs_data['FG']['l']
    w, z = dfs_data['LF'][l]
    return __check_conflict_fronds(x, y, w, z, dfs_data)
295210
function isPaddingBetweenTokens(first, second) {
      return second.loc.start.line - first.loc.end.line >= 2;
    }
347980
def _check_intersection(self, other):
        """"""
        # pylint: disable=C0123
        props = ["_callables_db", "_reverse_callables_db", "_modules_dict"]
        for prop in props:
            self_dict = getattr(self, prop)
            other_dict = getattr(other, prop)
            keys_self = set(self_dict.keys())
            keys_other = set(other_dict.keys())
            for key in keys_self & keys_other:
                svalue = self_dict[key]
                ovalue = other_dict[key]
                same_type = type(svalue) == type(ovalue)
                if same_type:
                    list_comp = isinstance(svalue, list) and any(
                        [item not in svalue for item in ovalue]
                    )
                    str_comp = isinstance(svalue, str) and svalue != ovalue
                    dict_comp = isinstance(svalue, dict) and svalue != ovalue
                    comp = any([list_comp, str_comp, dict_comp])
                if (not same_type) or (same_type and comp):
                    emsg = "Conflicting information between objects"
                    raise RuntimeError(emsg)
777401
def is_colliding(self, other):
        """"""
        if isinstance(other, AABoundingBox):
            if self.rect.colliderect(other.rect):
                return True
            return False
536458
def assert_lt(left, right, message=None, extra=None):
    """"""
    assert left < right, _assert_fail_message(message, left, right, ">=", extra)
1099946
private void rightFringe(
    DeleteStack.Linearizer       lxx,
    DeleteStack.FringeNote      xx,
    InsertStack   istack,
    GBSNode       f,
    GBSNode       g,
    boolean       gLeft)
  {

    GBSNode w = f.leftChild();     /* The left brother of delete fringe     */
    GBSNode s = f.rightChild();    /* t0 fringe from which we deleted       */
    int fbalance = f.balance();
    f.clearBalance();
    if (w == null)                 /* There is no left brother              */
      {
        boolean bLeft = true;
        if (g.rightChild() == f) {
          bLeft = false;
        }
        f.setRightChild(linearize(lxx, s));
        int maxBal = f.kFactor() - 1;
        if (maxBal < 3) {
          maxBal = 3;
        }
        istack.start(g, "GBSDeleteFringe.rightFringe");
        istack.setNode(1, null);
        istack.resetBalancePointIndex();
        int fpidx = 1;
        GBSInsertFringe.singleInstance().balance(
                      g.kFactor(), istack, f, fpidx, maxBal);
        xx.newg = g;
        if (bLeft) {
          xx.newf = g.leftChild();
        }
        else {
          xx.newf = g.rightChild();
        }
        xx.depthDecrease = true;
      }
    else                           /* There is a left brother               */
      {                            /* Elevate the left brother to the       */
        xx.newg = g;               /*  position of the current father.      */
        if (g.leftChild() == f) {  /*  This is an LL rotation to make up    */
          g.setLeftChild(w);       /*  for the disappearance of the         */
        }                          /*  right brother.                       */
        else {
          g.setRightChild(w);
        }
        f.setLeftChild(null);
        GBSNode p = w.rightMostChild();
        f.setRightChild(linearize(lxx, s));/* [f, s]                        */
        combine(p, f);             /* Now [w, f, s]. lastFringe cleans up   */
        xx.newf = w;               /* Remember new father                   */
        rightDepth(xx, fbalance);  /* Check for depth decrease              */
      }
  }
739991
def touching(self, other):
        
        if self.top < other.bottom: return False
        if self.bottom > other.top: return False

        if self.left > other.right: return False
        if self.right < other.left: return False

        return True
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
	}
1242163
def contains(self, x, ctrs, kdtree=None):
        """"""

        return self.overlap(x, ctrs, kdtree=kdtree) > 0
1194020
function hasConflict (a, b) {
  if (a.type === NOP || b.type === NOP) return false
  return isEqual(a.path, b.path)
}
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
1212379
def bbox_vert_aligned(box1, box2):
    
    if not (box1 and box2):
        return False
    # NEW: any overlap counts
    #    return box1.left <= box2.right and box2.left <= box1.right
    box1_left = box1.left + 1.5
    box2_left = box2.left + 1.5
    box1_right = box1.right - 1.5
    box2_right = box2.right - 1.5
    return not (box1_left > box2_right or box2_left > box1_right)
774987
def __embed_frond(node_u, node_w, dfs_data, as_branch_marker=False):
    """"""
    d_u = D(node_u, dfs_data)
    d_w = D(node_w, dfs_data)

    comp_d_w = abs(d_w)
    if as_branch_marker:
        d_w *= -1
        if dfs_data['last_inserted_side'] == 'LF':
            __insert_frond_RF(d_w, d_u, dfs_data)
        else:
            # We default to inserting a branch marker on the left side, unless we know otherwise
            __insert_frond_LF(d_w, d_u, dfs_data)
        return True

    LF = dfs_data['LF']
    m = dfs_data['FG']['m']
    l_w = lw(dfs_data)
    r_w = rw(dfs_data)
    u_m = u(m, dfs_data)
    x_m = fn_x(m, dfs_data)

    # There are multiple cases for both u and w
    # --Detect the case for u and store it for handling once the case for w is determined
    case_1 = False
    case_2 = False
    case_3 = False

    if d_u > u_m and d_u > x_m:
        case_1 = True
    elif d_u <= u_m and d_u > x_m:
        case_2 = True
    elif d_u > u_m and d_u <= x_m:
        case_3 = True
    else:
        # We should never get here, return false because there's no way we can embed this frond
        #print "Invalid u-case detected: (d_u, u_m, x_m): ({}, {}, {})".format(d_u, u_m, x_m)
        #print "FG: {}".format(dfs_data['FG'])
        #print "LF: {}".format(dfs_data['LF'])
        #print "RF: {}".format(dfs_data['RF'])
        return False

    # --Detect the case for w and process the edge appropriately
    if comp_d_w >= l_w and comp_d_w >= r_w:
        # Case 4
        #print "w-case 4 reached"
        # --We do the same thing for all three u-cases: Add the frond to the left side
        __insert_frond_LF(d_w, d_u, dfs_data)

        dfs_data['FG']['m'] += 1
        m = dfs_data['FG']['m']
        n = dfs_data['graph'].num_nodes()

        Lm = {'u': d_w, 'v': d_u}
        Rm = {'x': n, 'y': 0} # See page 17 for how we deal with Ri being empty
        #Rm = {}
        dfs_data['FG'][m] = [Lm, Rm]
        return True
    elif comp_d_w >= l_w and comp_d_w < r_w:
        # Case 5
        #print "w-case 5 reached"
        return __do_case_5_work(d_w, d_u, case_1, case_2, case_3, dfs_data)
    elif comp_d_w < l_w and comp_d_w >= r_w:
        # Case 6
        #print "w-case 6 reached"
        return __do_case_6_work(d_w, d_u, case_1, case_2, case_3, dfs_data)
    elif comp_d_w < l_w and comp_d_w < r_w:
        # Case 7
        #print "w-case 7 reached"
        #print "FG: {}".format(dfs_data['FG'])
        #print "LF: {}".format(dfs_data['LF'])
        #print "RF: {}".format(dfs_data['RF'])
        #print "(d_w, l_w, r_w): ({}, {}, {})".format(d_w, l_w, r_w)
        #print "(d_u, u_m, x_m, m): ({}, {}, {}, {})".format(d_u, u_m, x_m, m)
        while comp_d_w < l_w and comp_d_w < r_w:
            if d_u > u_m and d_u > x_m:
                #print "Nonplanar case reached: u-case 1, w-case 7"
                #print "FG: {}".format(dfs_data['FG'])
                #print "LF: {}".format(dfs_data['LF'])
                #print "RF: {}".format(dfs_data['RF'])
                #print "(d_w, l_w, r_w): ({}, {}, {})".format(d_w, l_w, r_w)
                #print "(d_u, u_m, x_m, m): ({}, {}, {}, {})".format(d_u, u_m, x_m, m)
                return False
            switch_sides(d_u, dfs_data)

            # --Update the local variables fo the next loop iteration
            l_w = lw(dfs_data)
            r_w = rw(dfs_data)
            m = dfs_data['FG']['m']
            u_m = u(m, dfs_data)
            x_m = fn_x(m, dfs_data)

        case_1 = False
        case_2 = False
        case_3 = False
        if d_u <= u_m and d_u > x_m:
            case_2 = True
        elif d_u > u_m and d_u <= x_m:
            case_3 = True

        if comp_d_w >= l_w and comp_d_w < r_w:
            # Case 5 redux
            #print "w-case 5 redux reached"
            return __do_case_5_work(d_w, d_u, case_1, case_2, case_3, dfs_data)
        if comp_d_w < l_w and comp_d_w >= r_w:
            # Case 6 redux
            #print "w-case 6 redux reached"
            return __do_case_6_work(d_w, d_u, case_1, case_2, case_3, dfs_data)
    else:
        # We should never get here, return false because there's no way we can embed this frond
        #print "Invalid w-case detected"
        return False

    # We really shouldn't get to this point, but this is a catch-all just in case
    #print "Failure catchall reached"
    return False
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
	}
145612
def overlap(self, other):
        """"""
        if self._start < other.end and self._end > other.start:
            return True
        return False
1075268
def check_X_y(X, y):
    
    if len(X) != len(y):
        raise ValueError('Inconsistent input and output data shapes. '\
                         'found X: {} and y: {}'.format(X.shape, y.shape))
619345
private boolean matches(Collection<Address> left, Collection<Address> right) {
    if (left.size() != right.size())
      return false;

    for (Address address : left) {
      if (!right.contains(address)) {
        return false;
      }
    }
    return true;
  }