// Add will add the data to the Stable Bloom Filter. It returns the filter to
// allow for chaining.
485687
func (s *StableBloomFilter) Add(data []byte) Filter {
	// Randomly decrement p cells to make room for new elements.
	s.decrement()

	lower, upper := hashKernel(data, s.hash)

	// Set the K cells to max.
	for i := uint(0); i < s.k; i++ {
		s.cells.Set((uint(lower)+uint(upper)*i)%s.m, s.max)
	}

	return s
}
511356
func (decaying *Decaying) Add(d float64) {
	prevVal := decaying.Value()
	decaying.Lock()
	decaying.p = prevVal + d
	decaying.Unlock()
}
1157041
func (c *Container) add(v uint16) (added bool) {

	if c.isArray() {
		added = c.arrayAdd(v)
	} else if c.isRun() {
		added = c.runAdd(v)
	} else {
		added = c.bitmapAdd(v)
	}
	if added {
		c.n++
	}
	return added
}
1148761
func (u *URLQueryParameters) Add(Key string, value string) {
	u.params = append(u.params, URLQueryParameter{Key: Key, Value: value})
}
189207
func (h *Plus) Add(v []byte) {
	x := h.hash(v)
	if h.sparse {
		h.tmpSet.add(h.encodeHash(x))

		if uint32(len(h.tmpSet))*100 > h.m {
			h.mergeSparse()
			if uint32(h.sparseList.Len()) > h.m {
				h.toNormal()
			}
		}
	} else {
		i := bextr(x, 64-h.p, h.p) // {x63,...,x64-p}
		w := x<<h.p | 1<<(h.p-1)   // {x63-p,...,x0}

		rho := uint8(bits.LeadingZeros64(w)) + 1
		if rho > h.denseList[i] {
			h.denseList[i] = rho
		}
	}
}
1205627
func (s *LoggerFilterWriter) Add(err string) {
	if s.out == nil {
		panic(Err.WithMsg("output io.Writer should be set with SetOutput method"))
	}
	s.phrases = append(s.phrases, []byte(err))
}
1367477
func (c *CountingBloomFilter) Add(data []byte) Filter {
	lower, upper := hashKernel(data, c.hash)

	// Set the K bits.
	for i := uint(0); i < c.k; i++ {
		c.buckets.Increment((uint(lower)+uint(upper)*i)%c.m, 1)
	}

	c.count++
	return c
}
233332
func (bf *Filter) add(data []byte) {
	if bf.msgFilterLoad == nil {
		return
	}

	// Adding data to a bloom filter consists of setting all of the bit
	// offsets which result from hashing the data using each independent
	// hash function.  The shifts and masks below are a faster equivalent
	// of:
	//   arrayIndex := idx / 8    (idx >> 3)
	//   bitOffset := idx % 8     (idx & 7)
	///  filter[arrayIndex] |= 1<<bitOffset
	for i := uint32(0); i < bf.msgFilterLoad.HashFuncs; i++ {
		idx := bf.hash(i, data)
		bf.msgFilterLoad.Filter[idx>>3] |= (1 << (7 & idx))
	}
}
276090
func (q *Query) AddFilter(f Filter) *Query {
	if q.Filters == nil {
		q.Filters = make([]Filter, 0)
	}
	q.Filters = append(q.Filters, f)
	return q
}
212096
func (m *matcher) add(filter string, template *Template) {
	if filter == "" {
		m.defaultTemplate = template
		m.root.separator = template.separator
		return
	}
	m.root.insert(filter, template)
}
1123175
func (h *HyperLogLog) Add(data []byte) *HyperLogLog {
	var (
		hash = h.calculateHash(data)
		k    = 32 - h.b
		r    = calculateRho(hash<<h.b, k)
		j    = hash >> uint(k)
	)

	if r > h.registers[j] {
		h.registers[j] = r
	}

	return h
}
495110
func (b *FooJSONBuilder) Add(info *FooPropertyInfo) *FooJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
1045765
func (t *Tombstoner) Add(keys [][]byte) error {
	return t.AddRange(keys, math.MinInt64, math.MaxInt64)
}
620857
func (i *InverseBloomFilter) Add(data []byte) Filter {
	index := i.index(data)
	i.getAndSet(index, data)
	return i
}
1030068
func (c *Context) Add(key string, value interface{}) {
	c.data[key] = value
}
346205
func (f *Filter) Add(p []byte) {
	last := f.fs[len(f.fs)-1]
	last.Add(p, f.hs[:last.K])
	if last.Left == 0 {
		f.addNewFilter(last.Log+1, last.K+1)
	}
}
435273
func (filter PvtNsCollFilter) Add(ns string, coll string) {
	collFilter, ok := filter[ns]
	if !ok {
		collFilter = make(map[string]bool)
		filter[ns] = collFilter
	}
	collFilter[coll] = true
}