Resets the iterator back to the beginning
337618
@Override
    public void reset() {
        buffer.clear();

        if (thread != null)
            thread.interrupt();
        try {
            // Shutdown() should be a synchronous operation since the iterator is reset after shutdown() is
            // called in AsyncLabelAwareIterator.reset().
            if (thread != null)
                thread.join();
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new RuntimeException(e);
        }
        this.thread.shutdown();
        buffer.clear();


        backedIterator.reset();
        shouldWork.set(true);
        this.thread = new AsyncPrefetchThread(buffer, backedIterator, terminator, null);

        /**
         * We want to ensure, that background thread will have the same thread->device affinity, as master thread
         */
        Nd4j.getAffinityManager().attachThreadToDevice(thread, deviceId);

        thread.setDaemon(true);
        thread.start();
        hasDepleted.set(false);

        nextElement = null;
    }
438698
public function reset()
    {
        $this->closed = false;
        $this->points = array();
        $this->rewind();
        $this->numberOfPoints = 0;
        $this->diagonalPointXIndex = null;
        $this->diagonalPointYIndex = null;
    }
673512
public void reset() {
		this.location = 0;
		this.first_created = 0;
		this.expiration = -1;
		this.validatorExpiration = -1;  // LI4537-24
		this.tableid = 0;
		this.key = null;
		this.value = null;
		this.next = 0;
		this.previous = 0;
		this.valuelen = -1;
		this.hash = 0;
		this.index = 0;
        this.size = -1;
        this.serializedKey        = null;
        this.serializedCacheValue = null;
        this.cacheValueSize = 0;
        this.cacheValueHashcode = 0;  // LI4337-17
        this.bAliasId = false;
        this.bValidHashcode = true;  // LI4337-17
	}
635851
function() {
      this.bounds.reset();
      for (var i = 0; i < this.slices.length; i++) {
        this.bounds.addValue(this.slices[i].start);
        this.bounds.addValue(this.slices[i].end);
      }
    }
268373
def reset(self):
        
        self.remaining_cycles = self.initial_training_cycles
        self.needle_index = random.randrange(self.input_size)
193102
public function reset() {
        $this->processstarted = false;
        $this->linenb = 0;
        $this->cir->init();
        $this->errors = array();
    }
66965
protected function reset()
    {
        $this->valid = true;
        $this->fetchmore = true;
        $this->elements = array();
        $this->position = -1;
        $this->current = null;
    }
594216
def reset(self):
        """"""
        self.start = 1
        self.count = None
        self.end = None
        self.stride = 1
        self.format = "%d"
129428
public function reset()
    {
        $this->pos(0);
        $this->matchHistory = array(null, null);
        $this->ss = new StringSearch($this->src);
    }
584208
public void reset() {
        data.rewind();

        // Read off the rows, columns, and non-zero elements
        data.getInt();
        data.getInt();
        data.getInt();

        // Reset the counters.
        curCol = 0;
        entry = 0;
        try {
            advance();
        } catch (IOException ioe) {
            throw new IOError(ioe);
        }
    }
879714
function Iterator() {
    var items = Array.prototype.slice.call(arguments, 0);

    this.items = (items.length == 1 && Array.isArray(items[0])) ? items[0] : items;
    this.reset();
}
241371
public function reset()
    {
        if (null !== $this->_dataReader) {
            $this->_dataReader->close();
        }
        $this->_dataReader = null;
        $this->_batch = null;
        $this->_value = null;
        $this->_key = null;
    }
485069
@Override
  public void reset() throws IOException {
    super.reset();
    currentPosition = -1;
    try {
      constructTokenCollection(input);
      tokenCollectionIterator = tokenCollection.iterator();
    } catch (MtasConfigException | MtasParserException e) {      
      tokenCollectionIterator = null;
      throw new IOException(e);
    }
  }
1149067
public void reset()
    {
        for(int i = 0; i < index.size(); i++)
            index.set(i, i);
    }
1107432
protected void reset() {
	done.set(false);
	performing.set(false);
	cancelled.set(false);
	estimated.set(0L);
    }
223811
@Override
    public void reset() {
        if (!iter.resetSupported()) {
            throw new IllegalStateException(
                            "Cannot reset MultipleEpochsIterator with base iter that does not support reset");
        }
        epochs = 0;
        lastBatch = batch;
        batch = 0;
        iterationsCounter.set(0);
        iter.reset();
    }
286777
def reset(self) -> None:
        
        self.evaluating = set()
        self.assumptions = {}
        self.known_results = {}
        self.current_node = None
        self.evaluate_stack = []
        self.bnode_map = {}