Adds a value to the stream.

@param x the new value.
491379
public synchronized void add(double x) {
		final double oldA = a;
		a += (x - a) / ++size;
		q += (x - a) * (x - oldA);
		min = Math.min(min, x);
		max = Math.max(max, x);
	}
1065707
@Override
    public void add(int idx, double val) {
        int i = Arrays.binarySearch(indices, 0, used, idx);
        if (i >= 0) {
            // Just add to the existing value.
            values[i] += val;
            return;
        } 
        int insertionPoint = -(i + 1);
        indices = insert(indices, insertionPoint, idx);
        values = insert(values, insertionPoint, val);
        used++;
    }
796687
public void put(Integer value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			compiledStatement.bindLong(compiledStatementBindIndex++, value);
		}
	}
1208975
public void add(Value value) {
	if (values == null) values = new LinkedList();
	values.add(value);
    }
391733
public void addNextValue(Object val) {
    String newVal = val.toString();
    if (this.maxVal == null || this.maxVal.compareTo(newVal) < 0) {
      this.maxVal = newVal;
    }
  }
711838
public void add(double x)
    {
        if (Double.isNaN(mean))//fist case
        {
            mean = x;
            variance = 0;
        }
        else//general case
        {
            //first update stnd deviation 
            variance = (1-smoothing)*(variance + smoothing*Math.pow(x-mean, 2));
            mean = (1-smoothing)*mean + smoothing*x;
        }
                    
    }
1178928
public void addValue(
                    final Object value
                    )
    {
        if (value == null) {
            setNullContained( true );
        } else {
            _values.add( String.valueOf( value ) );
        }
    }
1105811
public void add(
      double value
  )
  {
    readWriteLock.writeLock().lock();

    try {
      if (value < lowerLimit) {
        outlierHandler.handleOutlierAdd(false);
        return;
      } else if (value >= upperLimit) {
        outlierHandler.handleOutlierAdd(true);
        return;
      }

      count += 1;
      if (value > max) {
        max = value;
      }
      if (value < min) {
        min = value;
      }

      double valueRelativeToRange = value - lowerLimit;
      int targetBucket = (int) (valueRelativeToRange / bucketSize);

      if (targetBucket >= histogram.length) {
        targetBucket = histogram.length - 1;
      }

      histogram[targetBucket] += 1;
    }
    finally {
      readWriteLock.writeLock().unlock();
    }
  }
648275
public void addValue(Object current, Object value) throws ParseException, IOException {
		throw new RuntimeException(ERR_MSG + " addValue(Object current, Object value) in " + this.getClass());
	}
285552
public void put(Boolean value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			this.compiledStatement.bindLong(compiledStatementBindIndex++, (value == true ? 1 : 0));
		}
	}
973399
public boolean add(XEvent event) {
		try {
			events.append(event);
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
341078
private void putValue(Object value) {
        if (value==null) {
            return;
        }
        if (value instanceof MwsObject) {
            parameterPrefix.append('.');
            ((MwsObject)value).writeFragmentTo(this);
            return;
        }
        String svalue = value.toString();
        if (svalue!=null && svalue.length()>0) {
            String name = parameterPrefix.toString();
            parameters.put(name, svalue);
        }
    }
135007
public void add(double[] x) {
        if (root == null) {
            root = new Node();
            root.add(new Leaf(x));
            root.update(x);
        } else {
            root.add(x);
        }
    }
108313
public void setValue(Object value) {
    if (value instanceof Iterable<?>) {
      this.value = stream((Iterable<?>) value).map(this::toValue).collect(toList());
    } else {
      this.value = toValue(value);
    }
  }
1192035
public void add(long value) {
        writeLock.lock();
        try {
            // do we need to evict anything?
            if (this.values.size() >= this.size) {
                Long oldValue = this.values.pollFirst();
                // subtract from running total
                this.total -= oldValue.longValue();
            }
            // add this new value onto the end
            this.values.add(value);
            // add to our total
            this.total += value;
        } finally {
            writeLock.unlock();
        }
    }
741770
public void put(byte[] value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			compiledStatement.bindBlob(compiledStatementBindIndex++, value);
		}
	}
503643
public void addValue(int... value) {
        /* no-op if disabled */
        if (!enabled.get())
            return;

        for (int v : value) {
            try {
                getCurrentBucket().data.addValue(v);
            } catch (Exception e) {
                logger.error("Failed to add value: " + v, e);
            }
        }
    }