// 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.
174965
func (m1 Mat4x2) Add(m2 Mat4x2) Mat4x2 {
	return Mat4x2{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]}
}
343464
func (d *Dictionary) Add(key, value interface{}) {
	d.keys = append(d.keys, key)
	d.values = append(d.values, value)
}
1184393
func (s *set) Add(vs ...interface{}) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}
1030068
func (c *Context) Add(key string, value interface{}) {
	c.data[key] = value
}
1013774
func (v Values) Add(key, value string) {
	v[key] = append(v[key], value)
}
1300725
func Add(a, b []float64) {
	if len(a) != len(b) {
		panic("vectors must be the same length")
	}
	addAsm(a, b)
}
187472
func (as ArraySpec) Add(val Input) Input {
	return as.proc(func(i Input) Input {
		return i.Add(val)
	})
}
474083
func (s *ShapeIndexCell) add(c *clippedShape) {
	// C++ uses a set, so it's ordered and unique. We don't currently catch
	// the case when a duplicate value is added.
	s.shapes = append(s.shapes, c)
}
1284894
func (l *List) Add(values ...interface{}) {
	l.values = append(l.values, values...)
}
678779
func (c *ChainNode) Add(field string) {
	if len(field) == 0 || field[0] != '.' {
		panic("no dot in field")
	}
	field = field[1:] // Remove leading dot.
	if field == "" {
		panic("empty field")
	}
	c.Field = append(c.Field, field)
}
1277780
func (g *Mutable) Add(v, w int) {
	g.AddCost(v, w, 0)
}
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
}
951504
func Add(a, b []float32) {
	b = b[:len(a)]
	for i, v := range a {
		a[i] = v + b[i]
	}
}
707379
func Add(a, b []float32) {
	if len(a) != len(b) {
		panic("vectors must be the same length")
	}
	addAsm(a, b)
}
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
}
518682
func (c *Columns) Add(col *Column) error {
	for i := range c.columns {
		if c.columns[i] == col {
			return ErrorAlreadyExists
		}
	}
	if c.FindByName(col.Name) != nil {
		return ErrorAlreadyExists
	}

	c.columns = append(c.columns, col)
	return nil
}
95378
func (m Map) Add(key, value string) {
	m[key] = append(m[key], value)
}