// Add adds values to the bitmap. TODO(2.0) deprecate - use the more general
// AddN (though be aware that it modifies 'a' in place).
16117
func (b *Bitmap) Add(a ...uint64) (changed bool, err error) {
	changed = false
	for _, v := range a {
		// Create an add operation.
		op := &op{typ: opTypeAdd, value: v}

		// Write operation to op log.
		if err := b.writeOp(op); err != nil {
			return false, err
		}

		// Apply to the in-memory bitmap.
		if b.DirectAdd(v) {
			changed = true
		}
	}

	return changed, nil
}
876342
func (f *Values) Add(key, val string) {
	f.values = append(f.values, formValue{key, val})
}
597967
func (t *Trie) Add(a []byte, label string) {
	if len(a) == 0 {
		t.label = label
		return
	}

	if t.children == nil {
		t.children = map[byte]*Trie{}
	}

	l := a[0]
	c, ok := t.children[l]
	if !ok {
		c = &Trie{}
		t.children[l] = c
	}
	c.Add(a[1:], label)
}
1338448
func (c *Color) Add(value ...Attribute) *Color {
	c.params = append(c.params, value...)
	return c
}
511356
func (decaying *Decaying) Add(d float64) {
	prevVal := decaying.Value()
	decaying.Lock()
	decaying.p = prevVal + d
	decaying.Unlock()
}
248573
func (a *int64Amount) Add(b int64Amount) bool {
	switch {
	case b.value == 0:
		return true
	case a.value == 0:
		a.value = b.value
		a.scale = b.scale
		return true
	case a.scale == b.scale:
		c, ok := int64Add(a.value, b.value)
		if !ok {
			return false
		}
		a.value = c
	case a.scale > b.scale:
		c, ok := positiveScaleInt64(a.value, a.scale-b.scale)
		if !ok {
			return false
		}
		c, ok = int64Add(c, b.value)
		if !ok {
			return false
		}
		a.scale = b.scale
		a.value = c
	default:
		c, ok := positiveScaleInt64(b.value, b.scale-a.scale)
		if !ok {
			return false
		}
		c, ok = int64Add(a.value, c)
		if !ok {
			return false
		}
		a.value = c
	}
	return true
}
979042
func (ns *Namespace) Add(a, b interface{}) (interface{}, error) {
	return _math.DoArithmetic(a, b, '+')
}
454270
func (h *Histogram) Add(value int64) {
	for i := range h.labels {
		if i == len(h.labels)-1 || value <= h.cutoffs[i] {
			h.buckets[i].Add(1)
			h.total.Add(value)
			break
		}
	}
	if h.hook != nil {
		h.hook(value)
	}
}
544955
func (b *SampleFJSONBuilder) Add(info *SampleFPropertyInfo) *SampleFJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
136508
func (f *BloomFilter) Add(data []byte) *BloomFilter {
	h := baseHashes(data)
	for i := uint(0); i < f.k; i++ {
		f.b.Set(f.location(h, i))
	}
	return f
}
1248960
func Add(v1, v2 Vect) Vect {
	return Vect{v1.X + v2.X, v1.Y + v2.Y}
}
411768
func Add(a, b *T) T {
	return T{a[0] + b[0], a[1] + b[1], a[2] + b[2]}
}
82834
func (bi *BinaryInfo) AddImage(path string, addr uint64) {
	if !strings.HasPrefix(path, "/") {
		return
	}
	for _, image := range bi.Images {
		if image.Path == path && image.addr == addr {
			return
		}
	}
	//TODO(aarzilli): actually load informations about the image here
	bi.Images = append(bi.Images, &Image{Path: path, addr: addr})
}
73613
func (txMissingPvtData TxMissingPvtDataMap) Add(txNum uint64, ns, coll string, isEligible bool) {
	txMissingPvtData[txNum] = append(txMissingPvtData[txNum], &MissingPvtData{ns, coll, isEligible})
}
679987
func (sm *ScriptMap) Add(scriptName string, script *Script) {
	sm.lock.Lock()
	defer sm.lock.Unlock()
	sm.scripts[scriptName] = script
}
1197901
func (u *Usage) Add(other Usage) {
	u.Size += other.Size

	// TODO(stevvooe): assumes independent inodes, but provides and upper
	// bound. This should be pretty close, assuming the inodes for a
	// snapshot are roughly unique to it. Don't trust this assumption.
	u.Inodes += other.Inodes
}
1368245
func (s *Set) Add(val interface{}) bool {
	if s.data[val] {
		return false
	}

	s.data[val] = true
	s.values = append(s.values, val)
	return true
}