this method returns the spatial key in reverse order for easier right-shifting
494224
final long createReverseKey(double lat, double lon) {
        return BitUtil.BIG.reverse(keyAlgo.encode(lat, lon), keyAlgo.getBits());
    }
1348706
private int getKeyIndex(int key) {
    reindexItems();

    int index = Arrays.binarySearch(sortedKeys, key);
    if (index >= 0) {
      int prevIndex = index - 1;
      while (prevIndex >= 0 && sortedKeys[prevIndex] == key) {
        index = prevIndex;
        prevIndex = index - 1;
      }
      return index;
    } else {
      return -1;
    }
  }
758596
def reversed(self):
        """"""
        newpath = [seg.reversed() for seg in self]
        newpath.reverse()
        return Path(*newpath)
174554
def getTopRight(self):
        
        return (float(self.get_cx()) + float(self.get_rx()), float(self.get_cy()) + float(self.get_ry()))
150498
def shift_right(x, pad_value=None):
  """"""
  if pad_value is None:
    shifted_targets = tf.pad(x, [[0, 0], [1, 0], [0, 0], [0, 0]])[:, :-1, :, :]
  else:
    shifted_targets = tf.concat([pad_value, x], axis=1)[:, :-1, :, :]
  return shifted_targets
890395
def reverse(self):
        
        return BBox((self.min_y, self.min_x, self.max_y, self.max_x), crs=self.crs)
1083226
function getPrevKeyWith( keys, fullSid, ndx ) {

		ndx = ndx >= 0 ? ndx : ndx + keys.length;

		for ( ; ndx >= 0; ndx -- ) {

			var key = keys[ ndx ];

			if ( key.hasTarget( fullSid ) ) {

				return key;

			}

		}

		return null;

	}
481284
def get_above_right_key_rect(self):
        """"""

        key_above = self.row - 1, self.col, self.tab
        key_above_right = self.row - 1, self.col + 1, self.tab

        border_width_right = \
            float(self.cell_attributes[key_above]["borderwidth_right"]) / 2.0
        border_width_bottom = \
            float(self.cell_attributes[key_above_right]["borderwidth_bottom"])\
            / 2.0

        rect_above_right = (self.x+self.width, self.y-border_width_bottom,
                            border_width_right, border_width_bottom)
        return key_above_right, rect_above_right
840801
def invertDictMapping(d):
    
    inv_map = {}
    for k, v in d.items():
        inv_map[v] = inv_map.get(v, [])
        inv_map[v].append(k)
    return inv_map
839235
def get_inverses(self, keys):
        
        return tuple([as_index(k, axis=0).inverse for k in keys])
51778
function reverseObject(object) {
  const keys = Object.keys(object);

  let index = keys.length,
      newObject = {},
      key;

  while (index--) {
    key = keys[index];

    newObject[key] = object[key];
  }

  return newObject;
}
1035951
private void rightShift(
    int           ix)
  {
    for (int j = rightMostIndex(); j >= ix; j--)
      _nodeKey[j+1] = _nodeKey[j];
  }
1034553
def reversedict(d: Dict[Any, Any]) -> Dict[Any, Any]:
    
    return {v: k for k, v in d.items()}
708252
def spatialReference(self):
        """"""
        if self._wkid == None and self._wkt is not None:
            return {"wkt": self._wkt}
        else:
            return {"wkid": self._wkid}
468202
protected void reverse() {
    for(int i = 0, j = size - 1; i < j; i++, j--) {
      double tmpd = dists[j];
      dists[j] = dists[i];
      dists[i] = tmpd;
      int tmpi = ids[j];
      ids[j] = ids[i];
      ids[i] = tmpi;
    }
  }
616870
private int selectRightToLeft( int col , int[] scores ) {
		// see how far it can search
		int localMax = Math.min(imageWidth-regionWidth,col+maxDisparity)-col-minDisparity;

		int indexBest = 0;
		int indexScore = col;
		int scoreBest = scores[col];
		indexScore += imageWidth+1;

		for( int i = 1; i < localMax; i++ ,indexScore += imageWidth+1) {
			int s = scores[indexScore];

			if( s < scoreBest ) {
				scoreBest = s;
				indexBest = i;
			}
		}

		return indexBest;
	}
198608
public boolean setupKey(boolean reverse)
    {
        boolean sameFlag = true;
        for (int index = 1; index < m_rgiFldLeft.length; index++)
        {
            BaseField fldLeft = this.getLeftField(index);
            BaseField fldRight = this.getRightField(index);
            if (fldRight == null)
                break;
            if (fldLeft == fldRight)
            {
            }
            else
            {
                sameFlag = false;
                if (reverse)
                {
                    if (fldLeft != null)
                        fldLeft.moveFieldToThis(fldRight, DBConstants.DONT_DISPLAY, DBConstants.SCREEN_MOVE);
                }
                else
                {
                    if (fldLeft == null)
                        fldRight.setString(this.getLeftFieldNameOrValue(index, true, true), DBConstants.DONT_DISPLAY, DBConstants.SCREEN_MOVE);
                    else
                        fldRight.moveFieldToThis(fldLeft, DBConstants.DONT_DISPLAY, DBConstants.SCREEN_MOVE);
                }
            }
        }
        return sameFlag;
    }