Checks if the solution has converged to within the specified
        tolerance.
481746
def _check_convergence(self, P, Q, i, type):
        
        normP = linalg.norm(P, Inf)
        normQ = linalg.norm(Q, Inf)

        if self.verbose:
            logger.info("  %s  %3d   %10.3e   %10.3e" % (type,i, normP, normQ))

        if (normP < self.tolerance) and (normQ < self.tolerance):
            converged = True
        else:
            converged = False

        return converged
1292242
def satisfies_constraints(self, possible_solution):
        """"""
        for c in self._constraints:
            values = c.extract_values(possible_solution)
            if values is None or not c(*values):
                return False
        return True
859980
private void evaluateConstraints(DoubleSolution solution)  {
    double[] constraint = new double[this.getNumberOfConstraints()];
    double x1,x2,x3,x4,x5,x6,x7;

    x1 = solution.getVariableValue(0);
    x2 = solution.getVariableValue(1);
    x3 = solution.getVariableValue(2);
    x4 = solution.getVariableValue(3);
    x5 = solution.getVariableValue(4);
    x6 = solution.getVariableValue(5);
    x7 = solution.getVariableValue(6);

    constraint[0] = -((1.0/(x1*x2*x2*x3)) -(1.0/27.0));
    constraint[1] = -((1.0/(x1*x2*x2*x3*x3))-(1.0/397.5));
    constraint[2] = -((x4*x4*x4)/(x2*x3*x3*x6*x6*x6*x6)-(1.0/1.93));
    constraint[3] = -((x5*x5*x5)/(x2*x3*x7*x7*x7*x7)- (1.0/1.93));
    constraint[4] = -(x2*x3 - 40.0);
    constraint[5] = -((x1/x2) - 12.0);
    constraint[6] = -(5.0 - (x1/x2));
    constraint[7] = -(1.9 - x4 + 1.5*x6);
    constraint[8] = -(1.9 - x5 + 1.1*x7);

    double aux = 745.0 * x4 / (x2 * x3);
    double f2 = java.lang.Math.sqrt((aux*aux)+1.69e7) / (0.1*x6*x6*x6);
    constraint[9] = -(f2 - 1300);
    double a = 745.0*x5/(x2*x3);
    double b = 1.575e8;
    constraint[10] = -(java.lang.Math.sqrt(a*a+b)/(0.1*x7*x7*x7)-1100.0);

    double overallConstraintViolation = 0.0;
    int violatedConstraints = 0;
    for (int i = 0; i < getNumberOfConstraints(); i++) {
      if (constraint[i]<0.0){
        overallConstraintViolation+=constraint[i];
        violatedConstraints++;
      }
    }

    overallConstraintViolationDegree.setAttribute(solution, overallConstraintViolation);
    numberOfViolatedConstraints.setAttribute(solution, violatedConstraints);
  }
1026832
def _check_convergence(self, F):
        
        normF = linalg.norm(F, Inf)

        if normF < self.tolerance:
            converged = True
        else:
            converged = False
            if self.verbose:
                logger.info("Difference: %.3f" % (normF - self.tolerance))

        return converged
76470
public static boolean isPointOnMultiPolyline(LatLng point, MultiPolylineOptions multiPolyline, boolean geodesic, double tolerance) {
        boolean near = false;
        for (PolylineOptions polyline : multiPolyline.getPolylineOptions()) {
            near = isPointOnPolyline(point, polyline, geodesic, tolerance);
            if (near) {
                break;
            }
        }
        return near;
    }
572169
protected boolean updateDerivates() {
		functionGradientHessian(x,true, gradient, hessian);

		if( config.hessianScaling) {
			computeHessianScaling();
			applyHessianScaling();
		}

		hessian.extractDiagonals(diagOrig);

		if( checkConvergenceGTest(gradient) ) {
			if( verbose != null ) {
				verbose.println("Converged g-test");
			}
			return true;
		}

		mode = Mode.DETERMINE_STEP;

		return false;
	}
397116
public static boolean notEqualWithinTolerance(double left, double right, double tolerance) {
    if (Doubles.isFinite(left) && Doubles.isFinite(right)) {
      return Math.abs(left - right) > Math.abs(tolerance);
    } else {
      return false;
    }
  }
287456
private static boolean multiPointRelateMultiPoint_(MultiPoint multipoint_a,
			MultiPoint multipoint_b, double tolerance, int relation,
			ProgressTracker progress_tracker) {
		switch (relation) {
		case Relation.disjoint:
			return multiPointDisjointMultiPoint_(multipoint_a, multipoint_b,
					tolerance, progress_tracker);

		case Relation.within:
			return multiPointContainsMultiPoint_(multipoint_b, multipoint_a,
					tolerance, progress_tracker);

		case Relation.contains:
			return multiPointContainsMultiPoint_(multipoint_a, multipoint_b,
					tolerance, progress_tracker);

		case Relation.equals:
			return multiPointEqualsMultiPoint_(multipoint_a, multipoint_b,
					tolerance, progress_tracker);

		case Relation.overlaps:
			return multiPointOverlapsMultiPoint_(multipoint_a, multipoint_b,
					tolerance, progress_tracker);

		default:
			break; // warning fix
		}

		return false;
	}
1374321
private static boolean polylineRelateMultiPoint_(Polyline polyline_a,
			MultiPoint multipoint_b, double tolerance, int relation,
			ProgressTracker progress_tracker) {
		switch (relation) {
		case Relation.disjoint:
			return polylineDisjointMultiPoint_(polyline_a, multipoint_b,
					tolerance, progress_tracker);

		case Relation.contains:
			return polylineContainsMultiPoint_(polyline_a, multipoint_b,
					tolerance, progress_tracker);

		case Relation.touches:
			return polylineTouchesMultiPoint_(polyline_a, multipoint_b,
					tolerance, progress_tracker);

		case Relation.crosses:
			return polylineCrossesMultiPoint_(polyline_a, multipoint_b,
					tolerance, progress_tracker);

		default:
			break; // warning fix
		}

		return false;
	}
1173673
private static boolean pointContainsEnvelope_(Point2D pt_a,
			Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
		return pointEqualsEnvelope_(pt_a, env_b, tolerance, progress_tracker);
	}
1321539
def is_solved(self):
        
        return self.cross_goal(({f: self.cube[f] for f in "LUFDRB"}, 
            self.cube.select_type("edge") & self.cube.has_colour(self.cube["D"].colour)))
756297
static void checkTolerance(float tolerance) {
    checkArgument(!Float.isNaN(tolerance), "tolerance cannot be NaN");
    checkArgument(tolerance >= 0.0f, "tolerance (%s) cannot be negative", tolerance);
    checkArgument(
        floatToIntBits(tolerance) != NEG_ZERO_BITS, "tolerance (%s) cannot be negative", tolerance);
    checkArgument(tolerance != Float.POSITIVE_INFINITY, "tolerance cannot be POSITIVE_INFINITY");
  }
392513
private boolean checkHaworthAlignment(Point2d[] points) {
        
        for (int i = 0; i < points.length; i++) {
            Point2d curr = points[i];
            Point2d next = points[(i+1) % points.length];
            
            double deltaY = curr.y - next.y;
            
            if (Math.abs(deltaY) < CARDINALITY_THRESHOLD)
                return true;
        }
        
        return false;
    }
596301
private void evaluateConstraints(DoubleSolution solution) {
    double [] constraint = new double[this.getNumberOfConstraints()];
    double[] x = new double[getNumberOfVariables()] ;

    for (int i = 0; i < getNumberOfVariables(); i++) {
      x[i] = solution.getVariableValue(i) ;
    }

    double x1, x2, x3, x4;
    int var=0;
    int con=0;

    // restricciones de relaciÃƒÂ³n de forma en las paredes b/t
    for (int gr=0; gr<numberOfGroupElements_;gr++){

      var+=Groups_[gr][VARIABLES];
      con+=Groups_[gr][CONSTRAINT];

      if (Groups_[gr][SHAPE]==CIRCLE){
        x1=x[var-1]; // diameter
      }
      else if (Groups_[gr][SHAPE]==HOLE_CIRCLE){
        x1=x[var-2]; // diameter
        x2=x[var-1]; // tickness plate

        double ratio=x1/x2;
        if(ratio<x2/x1) ratio=x2/x1;
        constraint[con-1]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base
      }
      else if (Groups_[gr][SHAPE]==RECTANGLE){
        x1=x[var-2]; // higth (y axis)
        x2=x[var-1]; // witdth (z axis)

        double ratio = x1/x2;
        constraint[con-2]=+ratio-Groups_[gr][RATIO_YZ]*0.75; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-1]=-ratio+Groups_[gr][RATIO_YZ]*1.5; // relaciÃƒÂ³n entre altura y base minima

      }

      else if (Groups_[gr][SHAPE]==HOLE_RECTANGLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate

        double ratio=x1/x2;
        constraint[con-4]=+ratio-Groups_[gr][RATIO_YZ]*0.75; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=-ratio+Groups_[gr][RATIO_YZ]*1.25; // relaciÃƒÂ³n entre altura y base minima

        double tb1=-x3*15+x1;
        double tb2=+x3*30-x1;
        double ta1=-x4*10+x2;
        double ta2=+x4*20-x2;
        //double ta2=-x2/x4+27;//0.3*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-2]=Math.min(tb1, tb2);//-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=Math.min(ta1, ta2);//-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados

      }

      else if (Groups_[gr][SHAPE]==I_SINGLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate

        double ratio=x1/x2;
        constraint[con-4]=+ratio-Groups_[gr][RATIO_YZ]*0.75; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=-ratio+Groups_[gr][RATIO_YZ]*1.25; // relaciÃƒÂ³n entre altura y base minima

        double tb1=-x3*15+x1;
        double tb2=+x3*30-x1;
        double ta1=-x4*10+x2;
        double ta2=+x4*20-x2;

        //double tb1=-x3*20+x1;
        //double tb2=-x1/x3+35;//0.6*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        //double ta1=-x4*15+x2;
        //double ta2=-x2/x4+27;//0.3*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-2]=Math.min(tb1, tb2);//-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=Math.min(ta1, ta2);//-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados

      }

      else if (Groups_[gr][SHAPE]==I_DOUBLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]*0.85; // /2.0 relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS])); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+0.35*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS_CUT]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else if (Groups_[gr][SHAPE]==H_SINGLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]*0.85; // /2.0 relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+0.35*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS_CUT]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else if (Groups_[gr][SHAPE]==H_DOUBLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // thickness along Y axis => thickness of width  plate
        x4=x[var-1]; // thickness along Z axis => thickness of heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]*0.1; // 2.0 relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS_CUT]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else if (Groups_[gr][SHAPE]==L_SINGLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // thickness along Y axis => thickness of width  plate
        x4=x[var-1]; // thickness along Z axis => thickness heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // ratio between height and base
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else if (Groups_[gr][SHAPE]==L_DOUBLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else if (Groups_[gr][SHAPE]==T_SINGLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]*0.9; // 2.0 relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else if (Groups_[gr][SHAPE]==T_DOUBLE){
        x1=x[var-4]; // height (y axis)
        x2=x[var-3]; // width (Z axis)
        x3=x[var-2]; // tickness along Y axis => tickness of width  plate
        x4=x[var-1]; // tickness along Z axis => tickness of heigth plate
        double ratio=x1/x2;
        constraint[con-4]=-ratio+Groups_[gr][RATIO_YZ]; // relaciÃƒÂ³n entre altura y base maxima
        constraint[con-3]=+ratio-Groups_[gr][RATIO_YZ]*0.9; // 2.0 relaciÃƒÂ³n entre altura y base minima
        constraint[con-2]=-x1/x3+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
        constraint[con-1]=-x2/x4+1.12*Math.sqrt(Groups_[gr][E_]/(Groups_[gr][STRESS]*2.0)); // relaciÃƒÂ³n entre espesor de la placa y altura de lados
      }
      else{
        System.out.println("Error in constraint: transverse section not considerated for: " + gr + " group") ;
      }
    } // next gr

/*
    // LONGITUD TOTAL DE LA VIGA
    double l=0;
    for(int ba=0; ba<numberOfElements_; ba++){
        l+=Element_[ba][2];
    }
*/

    // RESTRICCIONES POR TENSIÃ“N
    for(int hi=0; hi<numberOfWeigthHypothesis_; hi++){
      for(int gr=0; gr<numberOfGroupElements_; gr++){

        // RESTRICCIONES DEBIDO A LA TENSIÃƒÂ³N DE TRACCIÃƒÂ³N
        constraint[con]=(-StrainMax_[gr][hi]+Groups_[gr][STRESS]); // -StrainMax_[gr][hi]*1.001+Groups_[gr][STRESS]
        con += 1;

        //constraint[con]=(-StrainMax_[gr][hi]+Groups_[gr][STRESS]*0.50); // -StrainMax_[gr][hi]*1.001+Groups_[gr][STRESS]
        //con += 1;

        // RESTRICCIONES DEBIDO A LA TENSIÃƒÂ³N DE COMPRESIÃƒÂ³N
        constraint[con]=(+StrainMin_[gr][hi]-Groups_[gr][COMPRESSION]); // +StrainMin_[gr][hi]*0.999-Groups_[gr][COMPRESSION]
        con += 1;

        //constraint[con]=(+StrainMin_[gr][hi]+Groups_[gr][COMPRESSION]*0.50); // +StrainMin_[gr][hi]*0.999-Groups_[gr][COMPRESSION]
        //con += 1;

        // RESTRICCIONES DEBIDO A LA TENSIÃƒâ€œN DE CORTE
        constraint[con]=(-StrainCutMax_[gr][hi]+Groups_[gr][STRESS_CUT]); // -StrainCutMax_[gr][hi]*1.001+Groups_[gr][STRESS_CUT]
        con += 1;
      }
    }


    for(int hi=0; hi<numberOfWeigthHypothesis_; hi++){
      // constraint of node displacement structure
      double deltaN=0;
      for(int i=0;i<nodeCheck_.length;i++){
        double xn=DisplacementNodes_[numberOfLibertyDegree_ * (int)nodeCheck_[i][0]+aX_][hi];
        double yn=DisplacementNodes_[numberOfLibertyDegree_ * (int)nodeCheck_[i][0]+aY_][hi];
        double zn=DisplacementNodes_[numberOfLibertyDegree_ * (int)nodeCheck_[i][0]+aZ_][hi];
        deltaN= Math.sqrt(Math.pow(xn,2)+Math.pow(yn,2)+Math.pow(zn,2));
        constraint[con]= (-deltaN +nodeCheck_[i][1]);
        con+=1;
      }
    }

    //constraint[0]=Math.sqrt(Math.pow(x, 2)+Math.pow(y, 2)+Math.pow(z, 2))+0.005;
    //descenso mÃƒÂ¡ximo en un nudo
    //constraint[1]=StrainResidual_[0][hi];


    double total = 0.0;
    //int number = 0;
    for (int i = 0; i < this.getNumberOfConstraints(); i++)
      if (constraint[i]<0.0){
        total+=constraint[i];
        //number++;
      }
    overallConstraintViolationDegree.setAttribute(solution, total);
    //solution.setOverallConstraintViolationDegree(total);
    //solution.setNumberOfViolatedConstraint(number);

  }
919926
def check_constraint_convergence(X, L, LX, Z, U, R, S, step_f, step_g, e_rel, e_abs):
    

    if isinstance(L, list):
        M = len(L)
        convergence = True
        errors = []
        # recursive call
        for i in range(M):
            c, e = check_constraint_convergence(X, L[i], LX[i], Z[i], U[i], R[i], S[i],
                                                step_f, step_g[i], e_rel, e_abs)
            convergence &= c
            errors.append(e)
        return convergence, errors
    else:
        # check convergence of prime residual R and dual residual S
        e_pri, e_dual = get_variable_errors(X, L, LX, Z, U, step_g, e_rel, e_abs)
        lR = l2(R)
        lS = l2(S)
        convergence = (lR <= e_pri) and (lS <= e_dual)
        return convergence, (e_pri, e_dual, lR, lS)
1029537
private static boolean multiPointContainsPoint_(MultiPoint multipoint_a,
			Point point_b, double tolerance, ProgressTracker progress_tracker) {
		return !multiPointDisjointPoint_(multipoint_a, point_b, tolerance,
				progress_tracker);
	}
868009
private static boolean polylineContainsEnvelope_(Polyline polyline_a,
			Envelope envelope_b, double tolerance,
			ProgressTracker progress_tracker) {
		Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
		envelope_b.queryEnvelope2D(env_b);
		polyline_a.queryEnvelope2D(env_a);

		if (!envelopeInfContainsEnvelope_(env_a, env_b, tolerance))
			return false;

		if (env_b.getHeight() > tolerance && env_b.getWidth() > tolerance)
			return false; // when treated as an area, lines cannot contain
							// areas.

		if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance) {// Treat
																				// as
																				// point
			Point2D pt_b = envelope_b.getCenterXY();
			return linearPathContainsPoint_(polyline_a, pt_b, tolerance);
		}

		// Treat as polyline
		Polyline polyline_b = new Polyline();
		Point p = new Point();
		envelope_b.queryCornerByVal(0, p);
		polyline_b.startPath(p);
		envelope_b.queryCornerByVal(2, p);
		polyline_b.lineTo(p);
		return linearPathWithinLinearPath_(polyline_b, polyline_a, tolerance, false);
	}