Regenerates all the internal data structures. This method should be called when the number of
nox items in the catalog has changed externally.
764751
public void recreate() {
    int newSize = noxItems.size();
    WeakReference<Bitmap> newBitmaps[] = new WeakReference[newSize];
    Drawable newDrawables[] = new Drawable[newSize];
    Drawable newPlaceholders[] = new Drawable[newSize];
    boolean newLoadings[] = new boolean[newSize];
    ImageLoader.Listener newListeners[] = new ImageLoader.Listener[newSize];
    float length = Math.min(bitmaps.length, newSize);
    for (int i = 0; i < length; i++) {
      newBitmaps[i] = bitmaps[i];
      newDrawables[i] = drawables[i];
      newPlaceholders[i] = placeholders[i];
      newLoadings[i] = loading[i];
      newListeners[i] = listeners[i];
    }
    bitmaps = newBitmaps;
    drawables = newDrawables;
    placeholders = newPlaceholders;
    loading = newLoadings;
    listeners = newListeners;
  }
384629
@Override
	public void resetLearningImpl()
	{
		this.windowSize = this.windowSizeOption.getValue();
		this.numTrees = this.numTreesOption.getValue();
		this.maxDepth = this.maxDepthOption.getValue();
		this.sizeLimit = this.sizeLimitOption.getValue();
		this.numInstances = 0;
		this.forest = new HSTreeNode[numTrees];
		this.referenceWindow = true;
		this.anomalyThreshold = this.anomalyThresholdOption.getValue();
	}
1146091
private function reindexResources() {
        if (count($this->resToReindex) == 0) {
            return;
        }

        $this->begin();
        foreach (array_unique($this->resToReindex) as $i) {
            try {
                $res = $this->getResourceByUri($i);
                $res->setMetadata($res->getMetadata());
                $res->updateMetadata();
            } catch (Deleted $e) {
                
            } catch (NotFound $e) {
                
            }
        }
        $this->resToReindex = [];
        $this->commit();
    }
1050619
def reload(self):
        
        new_model = self.collection.get(self.id)
        self.attrs = new_model.attrs
764906
public function reset()
    {
        $this->position           = 0;
        $this->mapIdToClassName   = [];
        $this->numericalIndex     = [];
        $this->argumentsById      = [];
        $this->constructorById    = [];
        $this->classNameById      = [];
        $this->dependenciesById   = [];
        $this->indexedByClassName = [];
    }
1196019
public synchronized void refreshIndexes() {
		/*
		 * cache index by Bin name
		 */
		if (this.indexCache == null)
			this.indexCache = new TreeMap<String, Index>();

		Node[] nodes = client.getNodes();
		for (Node node : nodes) {
			if (node.isActive()) {
				try {
					String indexString = Info.request(getInfoPolicy(), node, "sindex");
					if (!indexString.isEmpty()) {
						String[] indexList = indexString.split(";");
						for (String oneIndexString : indexList) {
							Index index = new Index(oneIndexString);
							this.indexCache.put(index.toKeyString(), index);
						}
					}
					break;
				} catch (AerospikeException e) {
					log.error("Error geting Index informaton", e);
				}
			}
		}
	}
1177728
protected void regenerateMetrics() {
    // Set up the metrics that are enabled regardless of instrumentation
    this.recordsIn = this.metricContext.meter(MetricNames.DataWriterMetrics.RECORDS_IN_METER);
    this.recordsAttempted = this.metricContext.meter(MetricNames.DataWriterMetrics.RECORDS_ATTEMPTED_METER);
    this.recordsSuccess = this.metricContext.meter(MetricNames.DataWriterMetrics.SUCCESSFUL_WRITES_METER);
    this.recordsFailed = this.metricContext.meter(MetricNames.DataWriterMetrics.FAILED_WRITES_METER);
    this.bytesWritten = this.metricContext.meter(MetricNames.DataWriterMetrics.BYTES_WRITTEN_METER);

    if (isInstrumentationEnabled()) {
      this.dataWriterTimer = Optional.<Timer>of(this.metricContext.timer(MetricNames.DataWriterMetrics.WRITE_TIMER));
    } else {
      this.dataWriterTimer = Optional.absent();
    }
  }
838204
public function reindex(): void
    {
        $this->index = [];
        $files = $this->scanDirectory($this->sourceDir, LabelIndex::RELATIVE_ROOT);

        foreach ($files as $file) {
            $node = $this->createIndexNode($file);
            $this->index[$node->getKey()] = $node;
        }

        $this->status = IndexInterface::STATUS_REINDEX;
    }
1086196
public function rebuildtree(){
		//Rebuild categories ads trigger count.

		//Rebuild nested set - get cat
		BLog::addToLog('[Items] rebuilding nested sets...');
		//
		$bcache=\Brilliant\BFactory::getCache();
		if($bcache){
			$bcache->invalidate();
			}
		//
		$catslist=$this->itemsFilter(array());
		BLog::addToLog('[Items] Total categories count:'.count($catslist).'...');

		$rootcats=array();
		//
		foreach($catslist as $cat){
			$cat->level=0;
			$cat->lft=0;
			$cat->rgt=0;
			if(empty($cat->{$this->parentKeyName})){
				$rootcats[]=$cat;
				}
			}
		//Sort root categories.
		$n=count($rootcats);
		BLog::addToLog('[Items] Root categories count:'.$n.'...');
		for($i=0; $i<$n; $i++){
			$m=$i;
			for($j=$i+1; $j<$n; $j++){
				if($rootcats[$j]->ordering < $rootcats[$m]->ordering){
					$m=$j;
					}
				}
			if($m!=$i){
				$t=$rootcats[$i];
				$rootcats[$i]=$rootcats[$m];
				$rootcats[$m]=$t;
				}
			}

		//Foreach by root categories...
		foreach($rootcats as $rcat){
			BLog::addToLog('[Items] Processing root category ['.$rcat->id.']');

			$rcat->level=1;
			$lft=1; $rgt=2;
			$this->rebuildtree_recursive($rcat,$lft,$rgt);
			$rcat->lft=1;
			$rcat->rgt=$rgt;
			}
		$db=\Brilliant\BFactory::getDBO();
		if(empty($db)){
			return false;
			}
		BLog::addToLog('[Items] Updating nested set...');
		foreach($catslist as $ct){
			$qr='UPDATE `'.$this->tableName.'` set `'.$this->leftKeyName.'`='.$ct->lft.', `'.$this->rightKeyName.'`='.$ct->rgt.', `'.$this->levelKeyName.'`='.$ct->level.' WHERE `'.$this->primaryKeyName.'`='.$ct->id;
			$q=$db->query($qr);
			if(empty($q)){
				return false;
				}
			}
		//Invalidate all cache.
		$bcache=\Brilliant\BFactory::getCache();
		if($bcache){
			$bcache->invalidate();
			}
		return true;
		}
709727
def rebuild(self, **kwargs):
        '''
        '''
        self.nodes = []
        self.node_types = []
        self.id_dict = {}
        self.type_dict = {}

        self.add_node(self.root)
636112
def _reset_internal(self):
        
        super()._reset_internal()

        # reset positions of objects
        self.model.place_objects()

        # reset joint positions
        init_pos = np.array([-0.5538, -0.8208, 0.4155, 1.8409, -0.4955, 0.6482, 1.9628])
        init_pos += np.random.randn(init_pos.shape[0]) * 0.02
        self.sim.data.qpos[self._ref_joint_pos_indexes] = np.array(init_pos)
1149067
public void reset()
    {
        for(int i = 0; i < index.size(); i++)
            index.set(i, i);
    }
538478
protected void internalRefreshStats()
    {
        checkState(Thread.holdsLock(root), "Must hold lock to refresh stats");
        synchronized (root) {
            if (subGroups.isEmpty()) {
                cachedMemoryUsageBytes = 0;
                for (ManagedQueryExecution query : runningQueries) {
                    cachedMemoryUsageBytes += query.getUserMemoryReservation().toBytes();
                }
            }
            else {
                for (Iterator<InternalResourceGroup> iterator = dirtySubGroups.iterator(); iterator.hasNext(); ) {
                    InternalResourceGroup subGroup = iterator.next();
                    long oldMemoryUsageBytes = subGroup.cachedMemoryUsageBytes;
                    cachedMemoryUsageBytes -= oldMemoryUsageBytes;
                    subGroup.internalRefreshStats();
                    cachedMemoryUsageBytes += subGroup.cachedMemoryUsageBytes;
                    if (!subGroup.isDirty()) {
                        iterator.remove();
                    }
                    if (oldMemoryUsageBytes != subGroup.cachedMemoryUsageBytes) {
                        subGroup.updateEligibility();
                    }
                }
            }
        }
    }
737847
@Override
    public void upgrade() {
        this.indexSetService.findAll()
            .stream()
            .map(mongoIndexSetFactory::create)
            .flatMap(indexSet -> getReopenedIndices(indexSet).stream())
            .map(indexName -> { LOG.debug("Marking index {} to be reopened using alias.", indexName); return indexName; })
            .forEach(indices::markIndexReopened);
    }
22501
function regenerate(moduleName, done){
		var cfg = clone(config, true);
		// if the moduleName is not in the graph, make it the main.
		if(moduleName && !cachedData.graph[moduleName]) {
			cfg.main = moduleName;
		}

		makeBundleGraph(cfg, options).then(function(data){
			var graph = data.graph;
			var oldGraph = cachedData ? cachedData.graph : {};
			for(var name in graph){
				if(name !== moduleName && oldGraph[name]) {
					graph[name].transforms = oldGraph[name].transforms;
				}
			}
			cachedData = cloneData(data);
			done(null, data);
		}, done);
	}
995723
def reload(self):
        
        enum = self._enum
        if not enum:
            return
        
        self.clear()
        
        if not self.isRequired():
            self.addItem('')
        
        if self.sortByKey():
            self.addItems(sorted(enum.keys()))
        else:
            items = enum.items()
            items.sort(key = lambda x: x[1])
            
            self.addItems(map(lambda x: x[0], items))
1213233
def rebuild_catalog_and_objects
      catalog = rebuild_catalog
      catalog[:Pages][:referenced_object][:Kids].each { |e| @objects << e[:referenced_object]; e[:referenced_object] }
      # adds every referenced object to the @objects (root), addition is performed as pointers rather then copies
      add_referenced()
      catalog
    end