Add scalar statistics.

@param right the right
@return the scalar statistics
762807
@javax.annotation.Nonnull
  public final synchronized com.simiacryptus.util.data.ScalarStatistics add(@javax.annotation.Nonnull final com.simiacryptus.util.data.ScalarStatistics right) {
    @javax.annotation.Nonnull final com.simiacryptus.util.data.ScalarStatistics sum = new com.simiacryptus.util.data.ScalarStatistics();
    sum.sum0 += sum0;
    sum.sum0 += right.sum0;
    sum.sum1 += sum1;
    sum.sum1 += right.sum1;
    sum.sum2 += sum2;
    sum.sum2 += right.sum2;
    return sum;
  }
979987
public SDVariable add(String varName, double scalar) {
        val function = sameDiff.f().add(this,scalar);
        return sameDiff.updateVariableNameAndReference(function,varName);
    }
263728
@Override
  public void put(Mean other) {
    if(!(other instanceof StatisticalMoments)) {
      throw new IllegalArgumentException("I cannot combine Mean or MeanVariance into to a StatisticalMoments class.");
    }
    if(other.n == 0.) {
      return;
    }
    StatisticalMoments othe = (StatisticalMoments) other;
    if(this.n == 0.) {
      this.n = othe.n;
      this.sum = othe.sum;
      this.m2 = othe.m2;
      this.m3 = othe.m3;
      this.m4 = othe.m4;
      return;
    }
    final double nn = othe.n + this.n;
    final double delta = othe.sum / othe.n - this.sum / this.n;

    // Some factors used below:
    final double delta_nn = delta / nn;
    final double delta_nn2 = delta_nn * delta_nn;
    final double delta_nn3 = delta_nn2 * delta_nn;
    final double na2 = this.n * this.n;
    final double nb2 = othe.n * othe.n;
    final double ntn = this.n * othe.n;

    this.m4 += othe.m4 + delta * delta_nn3 * ntn * (na2 - ntn + nb2) + 6. * (na2 * othe.m2 + nb2 * this.m2) * delta_nn2 + 4. * (this.n * othe.m3 - othe.n * this.m3) * delta_nn;
    this.m3 += othe.m3 + delta * delta_nn2 * ntn * (this.n - othe.n) + 3. * (this.n * othe.m2 - othe.n * this.m2) * delta_nn;
    this.m2 += othe.m2 + delta * delta_nn * this.n * othe.n;
    this.sum += othe.sum;
    this.n = nn;

    min = Math.min(min, othe.min);
    max = Math.max(max, othe.max);
  }
234907
public boolean add(int left, int right) {
        if (line[left] == null) {
            line[left] = new IntBitSet();
        } else {
            if (line[left].contains(right)) {
                return false;
            }
        }

        line[left].add(right);
        return true;
    }
342137
protected void addToStatistics(NumberVector nv) {
    final int d = nv.getDimensionality();
    assert (d == ls.length);
    this.n++;
    for(int i = 0; i < d; i++) {
      double v = nv.doubleValue(i);
      ls[i] += v;
      ss += v * v;
    }
  }
752897
public void addSimpleColumn(float left, float right) {
        ColumnDef newCol = new ColumnDef(left, right);
        columnDefs.add(newCol);
    }
1121026
public static Number multiply(Number left, Number right) {
        return NumberMath.multiply(left, right);
    }
258514
void addRightLeaf(
    Object            new1)
  {
    GBSNode  p = _index.getNode(new1);
    if (rightChild() != null)
      throw new RuntimeException("Help!");
    setRightChild(p);
  }
9552
def _add_right(self, d):
        '''
        
        '''
        if not self:
            self._left = d.first
            self._right = d.second
        elif d.first == self.right_end():
            self._right = d.second
        elif d.second == self.right_end():
            self._right = d.first
        else:
            raise dominoes.EndsMismatchException(
                '{} cannot be added to the right of'
                ' the board - values do not match!'.format(d)
            )

        self._length += 1
1046585
void add(Scalar o)
    {
        if (!type.equals(o.type))
        {
            throw new UnsupportedOperationException("Action with wrong kind of class");
        }
        value += o.value;
    }
258735
@NonNull
  public static Term add(@NonNull Term left, @NonNull Term right) {
    return new BinaryArithmeticTerm(ArithmeticOperator.SUM, left, right);
  }
222327
public void add(double value) {
    count++;
    min = Math.min(min, value);
    max = Math.max(max, value);
    sum += value;
    sumOfSquares += value * value;
    addQuantileValue(value);
  }
1014250
public Object add(Object left, Object right, ParserRuleContext errCtx) {
    if (left == null && right == null) {
      return 0;
    }

    // if either are collections... concatenate them
    if (left instanceof Collection<?> || right instanceof Collection<?>) {
      List<Object> res = newArrayList();
      res.addAll(toCollection(left));
      res.addAll(toCollection(right));
      return res;
    }

    // if either are strings... concatenate them
    if (left instanceof String || right instanceof String) {
      return toString(left).concat(toString(right));
    }

    // if both are maps... concatenate them
    if (left instanceof Map<?, ?> || right instanceof Map<?, ?>) {
      Map<Object, Object> res = newHashMap();
      res.putAll((Map<?, ?>) left);
      res.putAll((Map<?, ?>) right);
      return res;
    }

    try {

      // if either are floating point (double or float) use double
      if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) {
        double l = toDouble(left);
        double r = toDouble(right);
        return new Double(l + r);
      }

      // if either are bigdecimal use that type
      if (left instanceof BigDecimal || right instanceof BigDecimal) {
        BigDecimal l = toBigDecimal(left);
        BigDecimal r = toBigDecimal(right);
        BigDecimal result = l.add(r, getMathContext());
        return narrowBigDecimal(left, right, result);
      }

      // if either are numbers use integers
      if (left instanceof Number || right instanceof Number) {
        BigInteger l = toBigInteger(left);
        BigInteger r = toBigInteger(right);
        BigInteger result = l.add(r);
        return narrowBigInteger(left, right, result);
      }

    }
    catch (java.lang.NumberFormatException nfe) {
    }

    throw new ExecutionException("invalid operands for +", interpreter.getLocation(errCtx));
  }
566383
public static Object add(Object left, Object right) {
        return InfixOpNode.add(left, right, null);
    }
1295373
public SDVariable scalarMax(SDVariable in, Number value) {
        return scalarMax(null, in, value);
    }
1147863
def add_scalar_value(self, value_buf):
        
        self.__container_node.add_child(_Node(value_buf))
        self.current_container_length += len(value_buf)
671352
public Metric add(String name, String description, MeasurableStat stat) {
        return add(name, description, stat, null);
    }