// Add performs an element-wise addition of two matrices, this is
// equivalent to iterating over every element of m1 and adding the corresponding value of m2.
545050
func (m1 Mat4) Add(m2 Mat4) Mat4 {
	return Mat4{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7], m1[8] + m2[8], m1[9] + m2[9], m1[10] + m2[10], m1[11] + m2[11], m1[12] + m2[12], m1[13] + m2[13], m1[14] + m2[14], m1[15] + m2[15]}
}
90360
func (b *Builder) Add(name string, data Slice) *Builder {
	if data == nil {
		// Remove the column.
		if _, ok := b.t.cols[name]; !ok {
			if _, ok := b.t.consts[name]; !ok {
				// Nothing to remove.
				return b
			}
		}
		delete(b.t.cols, name)
		delete(b.t.consts, name)
		for i, n := range b.t.colNames {
			if n == name {
				copy(b.t.colNames[i:], b.t.colNames[i+1:])
				b.t.colNames = b.t.colNames[:len(b.t.colNames)-1]
				break
			}
		}
		return b
	}

	// Are we replacing an existing column?
	_, replace := b.t.cols[name]
	if !replace {
		_, replace = b.t.consts[name]
	}

	// Check the column and add it.
	rv := reflectSlice(data)
	dataLen := rv.Len()
	if len(b.t.cols) == 0 || (replace && len(b.t.cols) == 1) {
		if b.t.cols == nil {
			b.t.cols = make(map[string]Slice)
		}
		// First non-constant column (possibly replacing the
		// only non-constant column).
		b.t.cols[name] = data
		b.t.len = dataLen
	} else if b.t.len != dataLen {
		panic(fmt.Sprintf("cannot add column %q with %d elements to table with %d rows", name, dataLen, b.t.len))
	} else {
		b.t.cols[name] = data
	}

	if replace {
		// Make sure it's not in constants.
		delete(b.t.consts, name)
	} else {
		b.t.colNames = append(b.t.colNames, name)
	}

	return b
}
626421
func (i *AtomicInt) Add(n int64) {
	atomic.AddInt64((*int64)(i), n)
}
951504
func Add(a, b []float32) {
	b = b[:len(a)]
	for i, v := range a {
		a[i] = v + b[i]
	}
}
760042
func (b *UpdateBuilder) Add(column string) *UpdateBuilder {
	return b.addValue(column, param(column))
}
1272899
func (BitCurve *BitCurve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) {
	z := new(big.Int).SetInt64(1)
	return BitCurve.affineFromJacobian(BitCurve.addJacobian(x1, y1, z, x2, y2, z))
}
803440
func (b *MultiErrorBuilder) Add(err error) {
	// Do not add nil values.
	if err == nil {
		return
	}

	b.errors = append(b.errors, err)
}
811229
func (m *Matrix) Multiply(m2 *Matrix) *Matrix {
	multiplyMatricies(m.Val[:], m2.Val[:])
	return m
}
409347
func (p Pairs) Add(other []Pair) []Pair {
	// Create lookup of key/counts.
	m := make(map[uint64]uint64, len(p))
	for _, pair := range p {
		m[pair.ID] = pair.Count
	}

	// Add/merge from other.
	for _, pair := range other {
		m[pair.ID] += pair.Count
	}

	// Convert back to slice.
	a := make([]Pair, 0, len(m))
	for k, v := range m {
		a = append(a, Pair{ID: k, Count: v})
	}
	return a
}
790289
func (v1 Vec2) Add(v2 Vec2) Vec2 {
	return Vec2{v1[0] + v2[0], v1[1] + v2[1]}
}
1030068
func (c *Context) Add(key string, value interface{}) {
	c.data[key] = value
}
1248960
func Add(v1, v2 Vect) Vect {
	return Vect{v1.X + v2.X, v1.Y + v2.Y}
}
1096994
func (g *marshalGraph) add(v *marshalVertex) {
	g.Vertices = append(g.Vertices, v)
	sort.Sort(vertices(g.Vertices))
}
951209
func (c Context) Add(z, x, y *Big) *Big {
	if debug {
		x.validate()
		y.validate()
	}
	if z.invalidContext(c) {
		return z
	}

	if x.IsFinite() && y.IsFinite() {
		z.form = c.add(z, x, x.form, y, y.form)
		return c.round(z)
	}

	// NaN + NaN
	// NaN + y
	// x + NaN
	if z.checkNaNs(x, y, addition) {
		return z
	}

	if x.form&inf != 0 {
		if y.form&inf != 0 && x.form^y.form == signbit {
			// +Inf + -Inf
			// -Inf + +Inf
			return z.setNaN(InvalidOperation, qnan, addinfinf)
		}
		// ±Inf + y
		// +Inf + +Inf
		// -Inf + -Inf
		return z.Set(x)
	}
	// x + ±Inf
	return z.Set(y)
}
979042
func (ns *Namespace) Add(a, b interface{}) (interface{}, error) {
	return _math.DoArithmetic(a, b, '+')
}
376493
func (v1 Vec4) Add(v2 Vec4) Vec4 {
	return Vec4{v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2], v1[3] + v2[3]}
}
494463
func (b *Builder) Add(args ...string) error {
	for _, a := range args {
		if err := b.add(a); err != nil {
			return errwrap.Wrapf(fmt.Sprintf("invalid key/value pair %q: {{err}}", a), err)
		}
	}

	return nil
}