Reallocate this objects internal structures to take up the least
possible space, without changing this object's value.
18884
public UnicodeSet compact() {
        checkFrozen();
        if (len != list.length) {
            int[] temp = new int[len];
            System.arraycopy(list, 0, temp, 0, len);
            list = temp;
        }
        rangeList = null;
        buffer = null;
        return this;
    }
850413
@SuppressWarnings("unchecked")
  void resize(final int newSize) {
    final Object[] oldKeys = keys;
    final long[] oldValues = values;
    final short[] oldStates = states;
    keys = new Object[newSize];
    values = new long[newSize];
    states = new short[newSize];
    loadThreshold = (int) (newSize * LOAD_FACTOR);
    lgLength = Integer.numberOfTrailingZeros(newSize);
    numActive = 0;
    for (int i = 0; i < oldKeys.length; i++) {
      if (oldStates[i] > 0) {
        adjustOrPutValue((T) oldKeys[i], oldValues[i]);
      }
    }
  }
125367
def reset(self):
        
        for i in range(len(self.values)):
            self.values[i].delete(0, tk.END)

            if self.defaults[i] is not None:
                self.values[i].insert(0, self.defaults[i])
901786
def resize(self, size):
		
		if size < len(self):
			raise ValueError("Value is out of bound. Array can't be shrinked")
		current_size = self.__size
		for i in range(size - current_size):
			self.__array.append(WBinArray(0, self.__class__.byte_size))
		self.__size = size
966921
private void rehash(int newCapacity) {
		long[] oldKeys = keys;
		V[] oldVals = values;

		keys = new long[newCapacity];
		@SuppressWarnings({ "unchecked", "SuspiciousArrayCast" })
		V[] temp = (V[]) new Object[newCapacity];
		values = temp;

		maxSize = calcMaxSize(newCapacity);
		mask = newCapacity - 1;

		// Insert to the new arrays.
		for (int i = 0; i < oldVals.length; ++i) {
			V oldVal = oldVals[i];
			if (oldVal != null) {
				// Inlined put(), but much simpler: we don't need to worry about
				// duplicated keys, growing/rehashing, or failing to insert.
				long oldKey = oldKeys[i];
				int index = hashIndex(oldKey);

				for (;;) {
					if (values[index] == null) {
						keys[index] = oldKey;
						values[index] = oldVal;
						break;
					}

					// Conflict, keep probing. Can wrap around, but never reaches startIndex again.
					index = probeNext(index);
				}
			}
		}
	}
1374384
private void reclaimSpace()
    {
        if (_nameMap == null)
            return;

        if (_nameMap.size() > 0 && _nameMap.size() % _reclaimPoint == 0) {
            synchronized (_nameMap) {
                Set s = _nameMap.entrySet();
                Iterator it = s.iterator();
                while (it.hasNext()) {
                    Map.Entry e = (Map.Entry) it.next();

                    TrackingObject to = (TrackingObject) e.getValue();

                   // If the object has been reclaimed, then we remove the named object from the map.
                    WeakReference wr = to.getWeakINameable();
                    INameable o = (INameable) wr.get();
                    if (o == null) {
                        it.remove();
                    }

                }
                _reclaimPoint = _nameMap.size() + _reclaimIncrement;
             }
        }
    }
905789
final void internalReset(long initialValue) {
		Cell[] as = cells;
		base = initialValue;
		if (as != null) {
			int n = as.length;
			for (int i = 0; i < n; ++i) {
				Cell a = as[i];
				if (a != null) a.value = initialValue;
			}
		}
	}
498038
def reset(self):
        
        self._count = 0
        self._sum = float(0)
        self._min = float('inf')
        self._max = float(0)
1269397
protected void reset(int linksSize, int varArraySize) {
    _frameTop = 0;
    _linksTop = 0;

    // Don't bother reallocating _links array if it exists already
    if (_links == null) {
      _links = new int[linksSize];
    }

    // Adding one here to the stack of frame positions will allow us always 
    // to look one under without having to check if we're at zero.
    // (As long as the caller doesn't screw up link/unlink.)
    _links[_linksTop++] = 0;

    // Get a clean _stackFrames array and discard the old one.
    _stackFrames = new XObject[varArraySize]; 
  }
1112572
private void resize(int newCapacity) {
        // assert (newCapacity & -newCapacity) == newCapacity; // power of 2
        int newLength = newCapacity * 2;

        long[] oldTable = table;
        int oldLength = oldTable.length;
        if (oldLength == 2*MAXIMUM_CAPACITY) { // can't expand any further
            if (threshold == MAXIMUM_CAPACITY-1)
                throw new IllegalStateException("Capacity exhausted.");
            threshold = MAXIMUM_CAPACITY-1;  // Gigantic map!
            return;
        }
        if (oldLength >= newLength)
            return;

        long[] newTable = new long[newLength];
        threshold = (newCapacity * 3) / 4;

        for (int j = 0; j < oldLength; j += 2) {
            long key = oldTable[j];
            if (key != 0) {
                long value = oldTable[j+1];
                int i = hash(key, newLength);
                while (newTable[i] != 0)
                    i = nextKeyIndex(i, newLength);
                newTable[i] = key;
                newTable[i + 1] = value;
            }
        }
        table = newTable;
    }
235132
public void shrink() {
        if (c.length == length) {
            return;
        }
        char[] newc = new char[length];
        System.arraycopy(c, 0, newc, 0, length);
        c = newc;
    }
1089447
private void copyToOffset(int offset) {
    final int minCapacity = 2 * (offset + nbrruns);
    if (valueslength.capacity() < minCapacity) {
      // expensive case where we need to reallocate
      int newCapacity = valueslength.capacity();
      while (newCapacity < minCapacity) {
        newCapacity = (newCapacity == 0) ? DEFAULT_INIT_SIZE
            : newCapacity < 64 ? newCapacity * 2
                : newCapacity < 1024 ? newCapacity * 3 / 2 : newCapacity * 5 / 4;
      }
      ShortBuffer newvalueslength = ShortBuffer.allocate(newCapacity);
      copyValuesLength(this.valueslength, 0, newvalueslength, offset, nbrruns);
      this.valueslength = newvalueslength;
    } else {
      // efficient case where we just copy
      copyValuesLength(this.valueslength, 0, this.valueslength, offset, nbrruns);
    }
  }
1140368
private void internalRemove(int index)
    {
        int moving = size - index - 1;
        if (moving > 0)
            System.arraycopy(cells, index + 1, cells, index, moving);
        cells[--size] = null;
    }
586
protected void reallocateIndexes() {
        if (this.indexes == null || this.indexes.length != getFilteredModel().getSize()) {
            this.indexes = new int[getFilteredModel().getSize()];
        }
        applyConstraint();
    }
494786
def reset(self):
        
        self.prevframe = None
        self.wasmoving = False
        self.t0 = 0
        self.ismoving = False
275810
public void compact() {
    if (keys.length > size) {
      Class<?>[] newKeys = new Class<?>[size];
      Object[] newVals = new Object[size];
      System.arraycopy(keys, 0, newKeys, 0, size);
      System.arraycopy(values, 0, newVals, 0, size);
      keys = newKeys;
      values = newVals;
    }
  }
665788
def reset_small(self, eq):
        """"""
        assert eq in ('f', 'g')
        for idx, var in enumerate(self.__dict__[eq]):
            if abs(var) <= 1e-12:
                self.__dict__[eq][idx] = 0