Looks at the distance between each vertex.  If that distance is so small the edge can't be measured the
return true.
@param input polygon
@return true if too small or false if not
341529
private boolean checkShapeTooSmall(Polygon2D_F64 input) {
		// must be longer than the border plus some small fudge factor
		double minLength = cornerOffset*2 + 2;
		for (int i = 0; i < input.size(); i++) {
			int j = (i+1)%input.size();
			Point2D_F64 a = input.get(i);
			Point2D_F64 b = input.get(j);
			if( a.distance2(b) < minLength*minLength )
				return true;
		}

		return false;
	}
807163
private int minLimit(int input, int min) {
        if (input < min) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Config: " + input + " too small.");
            }
            return min;
        }
        return input;
    }
1018141
@Override
    public boolean condition(Object input) {
        Number n = (Number) input;
        return op.apply(n.longValue(), (value == null ? 0 : value), set);
    }
412365
private boolean intersectsOtherTexture(RegionData data) {
        final Rectangle rec1 = new Rectangle(data.x, data.y, data.width, data.height);
        for (RegionData other : regions.values()) {
            final Rectangle rec2 = new Rectangle(other.x, other.y, other.width, other.height);
            if (rec1.intersects(rec2)) {
                return true;
            }
        }
        return false;
    }
713086
protected boolean isShadowed(IEObjectDescription input) {
		final Iterable<IEObjectDescription> localElements = getLocalElementsByName(input.getName());
		final boolean isEmpty = isEmpty(localElements);
		return !isEmpty;
	}
1028790
private double[][] getPoints(Geometry input) {
        double[][] result = new double[input.getNumPoints()][];
        for (int i = 0; i < input.getPoints().size(); i++) {
            Point p = input.getPointN(i);
            if(p.isMeasured() && p.is3D()) {
                result[i] = new double[]{p.getX(), p.getY(), p.getZ(), p.getM()};
            } else if(p.isMeasured()) {
                // ideally we'd use something like Double.Nan, but JSON doesn't support that.
                result[i] = new double[]{p.getX(), p.getY(), 0, p.getM()};
            } else if(p.is3D()) {
                result[i] = new double[]{p.getX(), p.getY(), p.getZ()};
            } else {
                result[i] = new double[]{p.getX(), p.getY()};
            }
        }
        return result;
    }
87084
public boolean intersects(Geometry geometry) {
		if (geometry == null || isEmpty() || geometry.isEmpty()) {
			return false;
		}

		if (geometry.getNumGeometries() > 1) {
			for (int n = 0; n < geometry.getNumGeometries(); n++) {
				if (intersects(geometry.getGeometryN(n))) {
					return true;
				}
			}
		} else {
			Coordinate[] coordinates = geometry.getCoordinates();
			if (coordinates.length == 1) {
				return coordinate.equals(coordinates[0]);
			} else {
				for (int i = 0; i < coordinates.length - 1; i++) {
					if (Mathlib.distance(coordinates[i], coordinates[i + 1], coordinate) < Mathlib.ZERO) {
						return true;
					}
				}
			}
		}

		return false;
	}
670915
T clipInput(T input, T output) {
		double ratioInput = input.width/(double)input.height;
		double ratioOutput = output.width/(double)output.height;

		T a = input;

		if( ratioInput > ratioOutput ) { // clip the width
			int width = input.height*output.width/output.height;
			int x0 = (input.width-width)/2;
			int x1 = x0 + width;

			clipped = input.subimage(x0,0,x1,input.height, clipped);
			a = clipped;
		} else if( ratioInput < ratioOutput ) { // clip the height
			int height = input.width*output.height/output.width;
			int y0 = (input.height-height)/2;
			int y1 = y0 + height;

			clipped = input.subimage(0,y0,input.width,y1, clipped);
			a = clipped;
		}

		return a;
	}
1215292
private static boolean polygonTouchesPolyline_(Polygon polygon_a,
			Polyline polyline_b, double tolerance,
			ProgressTracker progress_tracker) {
		// Quick rasterize test to see whether the the geometries are disjoint,
		// or if one is contained in the other.
		int relation = tryRasterizedContainsOrDisjoint_(polygon_a, polyline_b,
				tolerance, false);

		if (relation == Relation.disjoint || relation == Relation.contains)
			return false;

		return polygonTouchesPolylineImpl_(polygon_a, polyline_b, tolerance,
				progress_tracker);
	}
1087258
public boolean intersects(Shape shape) {
        if(shape instanceof Rectangle) {
            Rectangle other = (Rectangle)shape;
    		if ((x > (other.x + other.width)) || ((x + width) < other.x)) {
    			return false;
    		}
    		if ((y > (other.y + other.height)) || ((y + height) < other.y)) {
    			return false;
    		}
            return true;
        }
        else if(shape instanceof Circle) {
            return intersects((Circle)shape);
        }
        else {
            return super.intersects(shape);
        }
	}
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);
	}
500250
private static boolean validateTermWithDistance(BytesRef term,
      ComponentTermVector termVector) throws IOException {
    if (termVector.distances == null || termVector.distances.isEmpty()) {
      return true;
    } else {
      // first check maximum for all distances
      for (SubComponentDistance item : termVector.distances) {
        if (item.maximum == null) {
          continue;
        } else {
          if (!item.getDistance().validateMaximum(term)) {
            return false;
          }
        }
      }
      // then check minimum for all distances
      for (SubComponentDistance item : termVector.distances) {
        if (item.minimum == null) {
          continue;
        } else {
          if (!item.getDistance().validateMinimum(term)) {
            return false;
          }
        }
      }
      // try {
      // System.out.println("ACCEPT: " + term.utf8ToString()+"
      // ("+termVector.distances.size()+")");
      // for (SubComponentDistance item : termVector.distances) {
      // System.out.println(
      // item.hashCode() + "\t" +
      // term.utf8ToString()+"\t"+item.getDistance().getClass().getName()+"\t"+item.getDistance().minimum+"\t"+item.getDistance().maximum
      // + "\t" +
      // item.getDistance().validate(term)+"\t"+item.getDistance().compute(term));
      // }
      // } catch (Exception e) {
      // System.out.println("PROBLEEM: "+e.getMessage());
      // }
      return true;
    }
  }
646328
@Override
	public boolean process(PairwiseImageGraph pairwiseGraph ) {
		this.graph = new MetricSceneGraph(pairwiseGraph);
		for (int i = 0; i < graph.edges.size(); i++) {
			decomposeEssential(graph.edges.get(i));
		}

		declareModelFitting();

		for (int i = 0; i < graph.edges.size(); i++) {
			Motion e = graph.edges.get(i);
			e.triangulationAngle = medianTriangulationAngle(e);
		}

		if( verbose != null )
			verbose.println("Selecting root");
		// Select the view which will act as the origin
		View origin = selectOriginNode();
		// Select the motion which will define the coordinate system
		Motion baseMotion = selectCoordinateBase( origin );

		this.graph.sanityCheck();

		if( verbose != null )
			verbose.println("Stereo triangulation");
		// Triangulate features in all motions which exceed a certain angle
		for (int i = 0; i < graph.edges.size() && !stopRequested ; i++) {
			Motion e = graph.edges.get(i);
			if( e.triangulationAngle > Math.PI/10 || e == baseMotion) {
				triangulateStereoEdges(e);
				if( verbose != null ) {
					int a = e.viewSrc.index;
					int b = e.viewDst.index;
					verbose.println("   Edge[" + i + "] "+a+"->"+b+"  feat3D="+e.stereoTriangulations.size());
				}
			}
		}
		if( stopRequested )
			return false;

		if( verbose != null )
			verbose.println("Defining the coordinate system");

		// Using the selecting coordinate frames and triangulated points define the coordinate system
		defineCoordinateSystem(origin, baseMotion);
		if( stopRequested )
			return false;

		if( verbose != null )
			verbose.println("Estimate all features");

		// Now estimate all the other view locations and 3D features
		estimateAllFeatures(origin, baseMotion.destination(origin));
		if( stopRequested )
			return false;

		// Convert the graph into the output format
		convertToOutput(origin);

		return viewsAdded.size() >= 2;
	}
614104
public static int min( GrayS32 input ) {
		if( BoofConcurrency.USE_CONCURRENT ) {
			return ImplImageStatistics_MT.min(input.data, input.startIndex, input.height, input.width , input.stride);
		} else {
			return ImplImageStatistics.min(input.data, input.startIndex, input.height, input.width , input.stride);
		}
	}
440190
boolean isEdge( int x , int y ) {
		if( edgeThreshold <= 0 )
			return false;

		double xx = derivXX.compute(x,y);
		double xy = derivXY.compute(x,y);
		double yy = derivYY.compute(x,y);

		double Tr = xx + yy;
		double det = xx*yy - xy*xy;

		// Paper quite "In the unlikely event that the determinant is negative, the curvatures have different signs
		// so the point is discarded as not being an extremum"
		if( det <= 0)
			return true;
		else {
			// In paper this is:
			// Tr**2/Det < (r+1)**2/r
			return( Tr*Tr >= edgeThreshold*det);
		}
	}
714504
public boolean intersects(Geometry geometry) {
		if (isEmpty()) {
			return false;
		}
		for (LineString lineString : lineStrings) {
			if (lineString.intersects(geometry)) {
				return true;
			}
		}

		return false;
	}
919725
public static boolean isDuplicated(final String input) {
    int len = input.length();
    if (len % 2 == 0) {
      int half = len / 2;
      if (hasEqualParts(input, half, half)) {
        return true;
      }
      if (input.substring(half, half + 1).equals(" ")
          && input.substring(half - 1, half).matches("[;,]")) {
        return hasEqualParts(input, half - 1, half + 1);
      }
    } else {
      int half = len / 2;
      String middlePart = input.substring(half - 1, half + 2);
      if (isSpaceCommaSpace(middlePart)) {
        return hasEqualParts(input, half - 1, half + 2);
      } else if (isCommaInTheMiddle(middlePart)
                 || isLineBreakInTheMiddle(middlePart)) {
        return hasEqualParts(input, half, half + 1);
      }
    }
    return false;
  }