Check if this space contains a given point

@param xp The x coordinate to check
@param yp The y coordinate to check
@return True if this space container the coordinate given
551950
public boolean contains(float xp, float yp) {
		return (xp >= x) && (xp < x+width) && (yp >= y) && (yp < y+height);
	}
3799
def overlap_bbox_and_point(bbox, xp, yp):
    """"""
    cx, cy = get_midpoint(bbox)

    dir_x = np.sign(cx-xp)
    dir_y = np.sign(cy-yp)

    if dir_x == -1:
        dx = xp - bbox.xmax
    elif dir_x == 1:
        dx = xp - bbox.xmin
    else:
        dx = 0

    if dir_y == -1:
        dy = yp - bbox.ymax
    elif dir_y == 1:
        dy = yp - bbox.ymin
    else:
        dy = 0
    return dx, dy
1069695
@Pure
	public boolean containsPoint(Point2D<?, ?> point, int groupIndex) {
		final int grpCount = getGroupCount();
		if (groupIndex < 0) {
			throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
		}
		if (groupIndex > grpCount) {
			throw new IndexOutOfBoundsException(groupIndex + ">" + grpCount); //$NON-NLS-1$
		}
		if (point == null) {
			return false;
		}

		for (int i = 0; i < getPointCountInGroup(groupIndex); ++i) {
			final Point2d cur = getPointAt(groupIndex, i);
			if (cur.epsilonEquals(point, MapElementConstants.POINT_FUSION_DISTANCE)) {
				return true;
			}
		}
		return false;
	}
1081850
private boolean isNotIncluded(Node x, Node y) {
        Node tmp;

        retry: while(true) {
        int yType = y.getType();

        switch(x.getType()) {
        case NodeType.CTYPE:
            switch(yType) {
            case NodeType.CTYPE:
            {
                CTypeNode cny = (CTypeNode)y;
                CTypeNode cnx = (CTypeNode)x;
                return cny.ctype == cnx.ctype && cny.not != cnx.not && cny.asciiRange == cnx.asciiRange;
            }
            case NodeType.CCLASS:
                // !swap:!
                tmp = x;
                x = y;
                y = tmp;
                // !goto retry;!
                continue retry;

            case NodeType.STR:
                // !goto swap;!
                tmp = x;
                x = y;
                y = tmp;
                continue retry;

            default:
                break;
            } // inner switch
            break;

        case NodeType.CCLASS:
            CClassNode xc = (CClassNode)x;

            switch(yType) {
            case NodeType.CTYPE:
            {
                CTypeNode yc = (CTypeNode)y;
                switch(yc.ctype) {
                case CharacterType.WORD:
                    if (!yc.not) {
                        if (xc.mbuf == null && !xc.isNot()) {
                            for (int i=0; i<BitSet.SINGLE_BYTE_SIZE; i++) {
                                if (xc.bs.at(i)) {
                                    if (yc.asciiRange) {
                                        if (enc.isSbWord(i)) return false;
                                    } else {
                                        if (enc.isWord(i)) return false;
                                    }
                                }
                            }
                            return true;
                        }
                        return false;
                    } else {
                        if (xc.mbuf != null) return false;
                        for (int i=0; i<BitSet.SINGLE_BYTE_SIZE; i++) {
                            boolean isWord;
                            if (yc.asciiRange) {
                                isWord = enc.isSbWord(i);
                            } else {
                                isWord = enc.isWord(i);
                            }

                            if (!isWord) {
                                if (!xc.isNot()) {
                                    if (xc.bs.at(i)) return false;
                                } else {
                                    if (!xc.bs.at(i)) return false;
                                }
                            }
                        }
                        return true;
                    }
                    // break; not reached
                default:
                    break;
                } // inner switch
                break;
            }

            case NodeType.CCLASS:
            {
                CClassNode yc = (CClassNode)y;

                for (int i=0; i<BitSet.SINGLE_BYTE_SIZE; i++) {
                    boolean v = xc.bs.at(i);
                    if ((v && !xc.isNot()) || (!v && xc.isNot())) {
                        v = yc.bs.at(i);
                        if ((v && !yc.isNot()) || (!v && yc.isNot())) return false;
                    }
                }
                if ((xc.mbuf == null && !xc.isNot()) || yc.mbuf == null && !yc.isNot()) return true;
                return false;
                // break; not reached
            }

            case NodeType.STR:
                // !goto swap;!
                tmp = x;
                x = y;
                y = tmp;
                continue retry;

            default:
                break;

            } // inner switch
            break; // case NodeType.CCLASS

        case NodeType.STR:
        {
            StringNode xs = (StringNode)x;
            if (xs.length() == 0) break;

            switch (yType) {
            case NodeType.CTYPE:
                CTypeNode cy = ((CTypeNode)y);
                switch (cy.ctype) {
                case CharacterType.WORD:
                    if (cy.asciiRange) {
                        if (Matcher.isMbcAsciiWord(enc, xs.bytes, xs.p, xs.end)) {
                            return cy.not;
                        } else {
                            return !cy.not;
                        }
                    } else {
                        if (enc.isMbcWord(xs.bytes, xs.p, xs.end)) {
                            return cy.not;
                        } else {
                            return !cy.not;
                        }
                    }

                default:
                    break;

                } // inner switch
                break;

            case NodeType.CCLASS:
                CClassNode cc = (CClassNode)y;
                int code = enc.mbcToCode(xs.bytes, xs.p, xs.p + enc.maxLength());
                return !cc.isCodeInCC(enc, code);

            case NodeType.STR:
                StringNode ys = (StringNode)y;
                int len = xs.length();
                if (len > ys.length()) len = ys.length();
                if (xs.isAmbig() || ys.isAmbig()) {
                    /* tiny version */
                    return false;
                } else {
                    for (int i=0, p=ys.p, q=xs.p; i<len; i++, p++, q++) {
                        if (ys.bytes[p] != xs.bytes[q]) return true;
                    }
                }
                break;

            default:
                break;
            } // inner switch

            break; // case NodeType.STR
        }
        } // switch

        break;
        } // retry: while
        return false;
    }
668646
static private boolean isAncestorPath(String x, String y) {
    if (!y.startsWith(x)) {
      return false;
    }
    final int len = x.length();
    return y.length() == len || y.charAt(len) == Path.SEPARATOR_CHAR;  
  }
877376
def contains?(x, y)
      self_area = triangle_area(@x1, @y1, @x2, @y2, @x3, @y3)
      questioned_area =
        triangle_area(@x1, @y1, @x2, @y2, x, y) +
        triangle_area(@x2, @y2, @x3, @y3, x, y) +
        triangle_area(@x3, @y3, @x1, @y1, x, y)

      questioned_area <= self_area
    end
32090
public boolean contains(Coordinate coord) {
		if (coord.getX() < this.getX()) {
			return false;
		}
		if (coord.getY() < this.getY()) {
			return false;
		}
		if (coord.getX() > this.getEndPoint().getX()) {
			return false;
		}
		if (coord.getY() > this.getEndPoint().getY()) {
			return false;
		}
		return true;
	}
1143026
public boolean contains(float xp, float yp) {
	    checkPoints();
	    
		if (xp <= getX()) {
			return false;
		}
		if (yp <= getY()) {
			return false;
		}
		if (xp >= maxX) {
			return false;
		}
		if (yp >= maxY) {
			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;
	}
103226
public boolean contains(float x, float y, float z) {
        for (int i = 0; i < 6; i++) {
            if (distance(i, x, y, z) <= 0) {
                return false;
            }
        }
        return true;
    }
1110298
@Pure
	boolean containsControlPoint(Point3D p) {
		double x, y, z;
		for(int i=0; i<this.numCoordsProperty.get();) {
			x = this.coordsProperty[i++].get();
			y = this.coordsProperty[i++].get();
			z = this.coordsProperty[i++].get();
			if (x==p.getX() && y==p.getY() && z==p.getZ()) {
				return true;
			}
		}
		return false;
	}
495960
public void addPoint(double x, double y)
    {
        if (npoints >= xpoints.length)
        {
            final int newLength = npoints * 2;
            xpoints = Arrays.copyOf(xpoints, newLength);
            ypoints = Arrays.copyOf(ypoints, newLength);
        }
        xpoints[npoints] = x;
        ypoints[npoints] = y;
        npoints++;
        updateBounds();
    }
913528
def contains(self, x, y):
        
        left, bottom, right, top = self.aarect().lbrt()
        return (left <= x <= right) and (bottom <= y <= top)
414864
@Override
  public boolean contains(final int x) {
    final short hb = Util.highbits(x);
    final Container c = highLowContainer.getContainer(hb);
    return c != null && c.contains(Util.lowbits(x));
  }
444365
public boolean contains(Paintable p) {
		if (children.contains(p)) {
			return true;
		}

		for (Paintable t : children) {
			if (t instanceof Composite) {
				if (((Composite) t).contains(p)) {
					return true;
				}
			}
		}
		return false;
	}
1242163
def contains(self, x, ctrs, kdtree=None):
        """"""

        return self.overlap(x, ctrs, kdtree=kdtree) > 0
40453
def contains?(point)
      last_point = @points[-1]
      oddNodes = false
      x = point.lng
      y = point.lat

      @points.each do |p|
        yi = p.lat
        xi = p.lng
        yj = last_point.lat
        xj = last_point.lng
        if yi < y && yj >= y ||
            yj < y && yi >= y
          oddNodes = !oddNodes if xi + (y - yi) / (yj - yi) * (xj - xi) < x
        end

        last_point = p
      end

      oddNodes
    end