Define the place of the speedBits in the edge flags for car.
969329
@Override
    public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index) {
        // first two bits are reserved for route handling in superclass
        super.createEncodedValues(registerNewEncodedValue, prefix, index);

        registerNewEncodedValue.add(priorityWayEncoder = new FactorizedDecimalEncodedValue(prefix + "priority", 3, PriorityCode.getFactor(1), false));
        registerNewEncodedValue.add(curvatureEncoder = new FactorizedDecimalEncodedValue(prefix + "curvature", 4, 0.1, false));
    }
1345844
private void interiorAreaInteriorArea_(int half_edge, int id_a, int id_b) {
		if (m_matrix[MatrixPredicate.InteriorInterior] == 2)
			return;

		int faceParentage = m_topo_graph.getHalfEdgeFaceParentage(half_edge);

		if ((faceParentage & id_a) != 0 && (faceParentage & id_b) != 0)
			m_matrix[MatrixPredicate.InteriorInterior] = 2;
	}
232528
def on_for_rotations(self, steering, speed, rotations, brake=True, block=True):
        
        (left_speed, right_speed) = self.get_speed_steering(steering, speed)
        MoveTank.on_for_rotations(self, SpeedNativeUnits(left_speed), SpeedNativeUnits(right_speed), rotations, brake, block)
707342
def flags(self):
        """"""
        return set((name.lower() for name in sorted(TIFF.FILE_FLAGS)
                    if getattr(self, 'is_' + name)))
848470
function getPiecesWhereCanIGo(board, positions) {
    return positions.map(position => {
        const { x, y, isBlack } = position;
        return {
            x, y, isBlack,
            whereCanIGo: getPositionsWhereCanIGo(board, position)
        };
    });
}
778466
private void determineInsetsAndAlignment() {
        borderInsets = new Insets(0, 0, 0, 0);

        //  The insets will only be updated for the edge the component will be
        //  diplayed on.
        //
        //  The X, Y alignment of the component is controlled by both the edge
        //  and alignment parameters

        if (edge == Edge.TOP) {
            borderInsets.top = component.getPreferredSize().height + gap;
            component.setAlignmentX(alignment);
            component.setAlignmentY(0.0f);
        } else if (edge == Edge.BOTTOM) {
            borderInsets.bottom = component.getPreferredSize().height + gap;
            component.setAlignmentX(alignment);
            component.setAlignmentY(1.0f);
        } else if (edge == Edge.LEFT) {
            borderInsets.left = component.getPreferredSize().width + gap;
            component.setAlignmentX(0.0f);
            component.setAlignmentY(alignment);
        } else if (edge == Edge.RIGHT) {
            borderInsets.right = component.getPreferredSize().width + gap;
            component.setAlignmentX(1.0f);
            component.setAlignmentY(alignment);
        }

        if (adjustInsets) {
            adjustBorderInsets();
        }
    }
772079
def PlaceUOffsetT(self, x):
        
        N.enforce_number(x, N.UOffsetTFlags)
        self.head = self.head - N.UOffsetTFlags.bytewidth
        encode.Write(packer.uoffset, self.Bytes, self.Head(), x)
632077
private void checkPoint(Collidable objectA, Map<Point, Set<Collidable>> acceptedElements, Point point)
    {
        final Set<Collidable> others = acceptedElements.get(point);
        for (final Collidable objectB : others)
        {
            if (objectA != objectB)
            {
                final List<Collision> collisions = objectA.collide(objectB);
                for (final Collision collision : collisions)
                {
                    toNotify.add(new Collided(objectA, objectB, collision));
                }
            }
        }
    }
953731
protected void flagsDefault(IntsRef edgeFlags, boolean forward, boolean backward) {
        if (forward)
            speedEncoder.setDecimal(false, edgeFlags, speedDefault);
        if (backward)
            speedEncoder.setDecimal(true, edgeFlags, speedDefault);
        accessEnc.setBool(false, edgeFlags, forward);
        accessEnc.setBool(true, edgeFlags, backward);
    }
305015
def Place(self, x, flags):
        

        N.enforce_number(x, flags)
        self.head = self.head - flags.bytewidth
        encode.Write(flags.packer_type, self.Bytes, self.Head(), x)
244483
@Pure
	public List<BusItineraryHalt> getBusHaltsOnSegment(RoadSegment segment) {
		if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
			return Collections.emptyList();
		}

		int cIdxSegment;
		int lIdxSegment = -1;
		int sIdxSegment = -1;
		RoadSegment cSegment;

		final List<BusItineraryHalt> halts = new ArrayList<>();

		for (final BusItineraryHalt bushalt : this.validHalts) {
			cIdxSegment = bushalt.getRoadSegmentIndex();
			if (cIdxSegment >= 0 && cIdxSegment < this.roadSegments.getRoadSegmentCount()
					&& cIdxSegment != lIdxSegment) {
				cSegment = this.roadSegments.getRoadSegmentAt(cIdxSegment);
				lIdxSegment = cIdxSegment;
				if (segment == cSegment) {
					sIdxSegment = cIdxSegment;
				} else if (sIdxSegment != -1) {
					// halt loop now because I'm sure there has no more bus halt
					break;
				}
			}
			if (sIdxSegment != -1) {
				halts.add(bushalt);
			}
		}

		return halts;
	}
71554
function() {
		
		for (var cI in this.layer.containers) {
	    	var c = this.layer.containers[cI];
	    
	    	var checkPoints = this.getContainerCorners(c);
	    	var inside = true;
	    
	    	for (var i in checkPoints)
				inside &= this.rubberband.pointIsInside(checkPoints[i].x, checkPoints[i].y);
		
	    	if (inside) {
				this.addContainer(c);
	    	}
		}
	
   }
1291842
private void interiorPointInteriorPoint_(int cluster, int id_a, int id_b) {
		if (m_matrix[MatrixPredicate.InteriorInterior] == 0)
			return;

		int clusterParentage = m_topo_graph.getClusterParentage(cluster);

		if ((clusterParentage & id_a) != 0 && (clusterParentage & id_b) != 0) {
			m_matrix[MatrixPredicate.InteriorInterior] = 0;
		}
	}
61979
def chk_edges(self):
        """"""
        goids = set(self.go2obj)
        self.chk_edges_nodes(self.edges, goids, "is_a")
        for reltype, edges in self.edges_rel.items():
            self.chk_edges_nodes(edges, goids, reltype)
1069202
function Edge(u, v) {

			this.u = u;
			this.v = v;
			this.iterator = null;
			this.uiterator = null;
			this.viterator = null;
		}
1061987
protected void setSpeed(boolean reverse, IntsRef edgeFlags, double speed) {
        if (speed < 0 || Double.isNaN(speed))
            throw new IllegalArgumentException("Speed cannot be negative or NaN: " + speed + ", flags:" + BitUtil.LITTLE.toBitString(edgeFlags));

        if (speed < speedFactor / 2) {
            speedEncoder.setDecimal(reverse, edgeFlags, 0);
            accessEnc.setBool(reverse, edgeFlags, false);
            return;
        }

        if (speed > getMaxSpeed())
            speed = getMaxSpeed();

        speedEncoder.setDecimal(reverse, edgeFlags, speed);
    }
887444
@Pure
	public boolean hasBusHaltOnSegment(RoadSegment segment) {
		if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
			return false;
		}

		int cIdxSegment;
		int lIdxSegment = -1;
		RoadSegment cSegment;

		for (final BusItineraryHalt bushalt : this.validHalts) {
			cIdxSegment = bushalt.getRoadSegmentIndex();
			if (cIdxSegment >= 0 && cIdxSegment < this.roadSegments.getRoadSegmentCount()
					&& cIdxSegment != lIdxSegment) {
				cSegment = this.roadSegments.getRoadSegmentAt(cIdxSegment);
				lIdxSegment = cIdxSegment;
				if (segment == cSegment) {
					return true;
				}
			}
		}

		return false;
	}