Updates this sketch with the given double data item
@param dataItem an item from a stream of items. NaNs are ignored.
496333
public void update(final T dataItem) {
    // this method only uses the base buffer part of the combined buffer

    if (dataItem == null) { return; }
    if ((maxValue_ == null) || (comparator_.compare(dataItem, maxValue_) > 0)) { maxValue_ = dataItem; }
    if ((minValue_ == null) || (comparator_.compare(dataItem, minValue_) < 0)) { minValue_ = dataItem; }

    if ((baseBufferCount_ + 1) > combinedBufferItemCapacity_) {
      ItemsSketch.growBaseBuffer(this);
    }
    combinedBuffer_[baseBufferCount_++] = dataItem;
    n_++;
    if (baseBufferCount_ == (2 * k_)) {
      ItemsUtil.processFullBaseBuffer(this);
    }
  }
921793
public InventoryResultEntity withData(java.util.Map<String, InventoryResultItem> data) {
        setData(data);
        return this;
    }
257391
@Override
  public void add(MtasDataItem<T1, T2> newItem) throws IOException {
    if (newItem instanceof MtasDataItemFull) {
      MtasDataItemFull<T1, T2> newTypedItem = (MtasDataItemFull<T1, T2>) newItem;
      T1[] tmpValue = operations
          .createVector1(fullValues.length + newTypedItem.fullValues.length);
      System.arraycopy(fullValues, 0, tmpValue, 0, fullValues.length);
      System.arraycopy(newTypedItem.fullValues, 0, tmpValue, fullValues.length,
          newTypedItem.fullValues.length);
      fullValues = tmpValue;
      recomputeComparableSortValue = true;
    } else {
      throw new IOException("can only add MtasDataItemFull");
    }
  }
80198
protected void putItem(final ItemData data)
   {
      cache.put(new CacheId(data.getIdentifier()), new CacheValue(data, System.currentTimeMillis() + liveTime));
      cache.put(new CacheQPath(data.getParentIdentifier(), data.getQPath(), ItemType.getItemType(data)),
         new CacheValue(data, System.currentTimeMillis() + liveTime));
   }
1007086
@Override
	public void updateComponent(final Object data) {
		MyData myData = (MyData) data;
		name.setText("<B>" + myData.getName() + "</B>");
		count.setText(String.valueOf(myData.getCount()));
	}
54087
public int submitSingle(T item) {
        if (Objects.isNull(item))
            return 0;
        synchronized (this.dataList) {
            this.dataList.add(item);
            setLastDataTimestamp();
            if (this.dataList.size() >= this.bulkSize)
                flush();
            return 1;
        }
    }
30480
public function update($dataItem)
    {
        /** @var DataItem $dataItem */
        $dataItem   = $this->create($dataItem);
        $data       = $this->cleanData($dataItem->toArray());
        $connection = $this->getConnection();
        unset($data[ $this->getUniqueId() ]);

        if (empty($data)) {
            throw new \Exception("DataItem can't be updated without criteria");
        }

        $connection->update($this->tableName, $data, array($this->uniqueId => $dataItem->getId()));
        return $dataItem;
    }
372688
synchronized void addDataPoint(double value, int updated) {
        // 8/10/2012: Force the standard deviation to 1/3 of the first data point
        // 8/11:2012: Force it to 1/6th of the first data point (more accurate)
        if (ewmaVariance == Double.NEGATIVE_INFINITY) {
            reset(value, updated);
            return;
        }

        double delta = value - ewma;
        double increment = ALPHA * delta;

        ewma += increment;
        ewmaVariance = (1 - ALPHA) * (ewmaVariance + delta * increment);
        ewmaStddev = Math.sqrt(ewmaVariance);

        lastUpdate = updated;
    }
1157215
public void handleData(String data) {
		value = Double.valueOf(data);
		sendEvent(new SlideEvent(this.user, getPayload(), value));
		if (handler != null)
			handler.slide(value);
	}
351300
public void rerender() {
        clear();
        if (dataItems != null) {
            for (M m : dataItems) {
                addDataItem(m);
            }
        }
        doRefresh();
    }
945080
function changedActiveItems(dataSource) {
  reviseLegendHelper(dataSource);
  updateEntitiesAndExtent(dataSource); // Only does anything if there are lat & lon columns.
  dataSource._changed.raiseEvent(dataSource);
}
244472
public void setDataItems(List<M> items) {
        boolean changed = this.dataItems != items;
        if (items == null) {
            this.dataItems = null;
        } else {
            this.dataItems = items instanceof BindableListWrapper ? (BindableListWrapper<M>) items
                                                                  : new BindableListWrapper<M>(items);
            if (changed) this.dataItems.addChangeHandler(this);
        }
        addDataItems();
    }
811356
public void addValue(double value)
    {
        if (dataSetSize == dataSet.length)
        {
            // Increase the capacity of the array.
            int newLength = (int) (GROWTH_RATE * dataSetSize);
            double[] newDataSet = new double[newLength];
            System.arraycopy(dataSet, 0, newDataSet, 0, dataSetSize);
            dataSet = newDataSet;
        }
        dataSet[dataSetSize] = value;
        updateStatsWithNewValue(value);
        ++dataSetSize;
    }
733239
public void update(final long item) {
    if (itemsSeen_ == MAX_ITEMS_SEEN) {
      throw new SketchesStateException(
          "Sketch has exceeded capacity for total items seen: " + MAX_ITEMS_SEEN);
    }

    if (itemsSeen_ < reservoirSize_) { // initial phase, take the first reservoirSize_ items
      if (itemsSeen_ >= currItemsAlloc_) {
        growReservoir();
      }
      assert itemsSeen_ < currItemsAlloc_;
      // we'll randomize replacement positions, so in-order should be valid for now
      data_[(int) itemsSeen_] = item; // since less than reservoir size, cast is safe
      ++itemsSeen_;
    } else { // code for steady state where we sample randomly
      ++itemsSeen_;
      // prob(keep_item) < k / n = reservoirSize_ / itemsSeen_
      // so multiply to get: keep if rand * itemsSeen_ < reservoirSize_
      if ((SamplingUtil.rand.nextDouble() * itemsSeen_) < reservoirSize_) {
        final int newSlot = SamplingUtil.rand.nextInt(reservoirSize_);
        data_[newSlot] = item;
      }
    }
  }
954606
public void update(final Memory mem, final ArrayOfItemsSerDe<T> serDe) {
    if (mem == null) {
      return;
    }

    ReservoirItemsSketch<T> ris = ReservoirItemsSketch.heapify(mem, serDe);
    ris = (ris.getK() <= maxK_ ? ris : ris.downsampledCopy(maxK_));

    if (gadget_ == null) {
      createNewGadget(ris, true);
    } else {
      twoWayMergeInternal(ris, true);
    }
  }
315472
@Override
  public MtasDataCollector<?, ?> add(double[] values, int number)
      throws IOException {
    MtasDataCollector<?, ?> dataCollector = add(false);
    Long[] newValues = new Long[number];
    for (int i = 0; i < values.length; i++)
      newValues[i] = Double.valueOf(values[i]).longValue();
    setValue(newCurrentPosition, newValues, number, newCurrentExisting);
    return dataCollector;
  }
321823
public void setValueAt( int index, double value ) {

        int row = index / data[0].length;
        int col = index % data[0].length;

        data[row][col] = value;
    }